perm filename ALCODE.XGP[HAL,HE]1 blob sn#193348 filedate 1975-12-12 generic text, type T, neo UTF8
/FONT#0=BASL30[HAL, HE]/FONT#1=BASI30[HAL, HE]/FONT#2=BASB30/FONT#4=GRK30/FONT#5=LPT/FONT#6=BDR40/FONT#7=BDR66/TMAR=200/PMAR=1992/BMAR=2
␈↓␈↓↓␈↓α␈↓∧␈↓¬␈↓ε␈↓π␈↓ ↓H␈β↓H␈↓␈↓ ↓H
␈↓ ↓H␈β↓f␈↓␈↓ ↓H
␈↓ ↓H␈βα∧␈↓␈↓ ↓H
␈↓ ↓H␈βα"␈↓␈↓ ↓H
␈↓ ↓H␈βα@␈↓␈↓ ↓H
␈↓ ↓H␈βα↑␈↓␈↓ ε␈↓εInterim ␈↓ ↓H
␈↓ ↓H␈ββε␈↓ε␈↓ ∧2␈↓πAL User's Handbook␈↓α␈↓ ↓H
␈↓ ↓H␈ββH␈↓α␈↓ ↓H
␈↓ ↓H␈ββf␈↓α␈↓ ¬a␈↓αRussell H. Taylor␈↓ ↓H
␈↓ ↓H␈β∧∧␈↓α␈↓ ∧4Stanford Artificial Intelligence Laboratory␈↓ ↓H
␈↓ ↓H␈β∧"␈↓α␈↓ εαDEC 12, 1975␈↓ ↓H
␈↓ ↓H␈β∧@␈↓α␈↓ ↓H
␈↓ ↓H␈β∧↑␈↓α␈↓ ↓H
␈↓ ↓H␈β∧|␈↓α␈↓ ↓H
␈↓ ↓H␈β¬~␈↓α␈↓ ↓H
␈↓ ↓H␈β¬8␈↓α␈↓ ↓H
␈↓ ↓H␈β¬V␈↓α␈↓ ↓H
␈↓ αK␈β¬t␈↓α␈↓ αK␈↓ αK
␈↓ αK␈βε∩␈↓α␈↓εI.␈↓ βNIntroduction␈↓ αK
␈↓ αK␈βε:␈↓εII.␈↓ βNInput Format␈↓ αK
␈↓ αK␈βεb␈↓εIII.␈↓ βNPredeclared Variables and Constants␈↓ αK
␈↓ αK␈βπ
␈↓εIV.␈↓ βNDeclarations␈↓ αK
␈↓ αK␈βπ2␈↓εV.␈↓ βNGlobal Declarations␈↓ αK
␈↓ αK␈βπZ␈↓εVI.␈↓ βNControl Structures␈↓ αK
␈↓ αK␈βλα␈↓εVII.␈↓ βNDevice Control Statements␈↓ αK
␈↓ αK␈βλ*␈↓εVIII.␈↓ βNGraph Structure Statements␈↓ αK
␈↓ αK␈βλR␈↓εIX.␈↓ βNMiscellaneous Statements␈↓ αK
␈↓ αK␈βλz␈↓εX.␈↓ βNStatements that Emit No Code␈↓ αK
␈↓ αK␈β	"␈↓εXI.␈↓ βNExpressions␈↓ αK
␈↓ αK␈β	J␈↓εXII.␈↓ βNOperating Instructions␈↓ αK
␈↓ ↓H␈β	r␈↓ε␈↓ ↓H␈↓ ↓H
␈↓ ↓H␈β↓H␈↓ε␈↓ ¬i␈↓εIntroduction␈↓␈↓ ↓H
␈↓ ↓H␈β↓x␈↓␈↓ ↓H
␈↓ ↓H␈βα ␈↓␈↓ ↓HThis␈αdocument␈αis␈αintended␈αto␈αserve␈αas␈αan␈α"interim␈αprogrammer's␈αmanual"␈αfor␈αpeople␈αwho␈αmay␈αwant␈↓ ↓H
␈↓ ↓H␈βαH␈↓␈↓ ↓Hto␈α
use␈α
AL␈α
in␈α
its␈α
present␈α
state.␈α
To␈α
get␈α
your␈α
own␈α
copy,␈α
XSPOOL␈α
ALCODE.XGP[HAL,HE].␈↓ ↓H
␈↓ ↓H␈βαp␈↓␈↓ ↓H
␈↓ ↓H␈ββ_␈↓␈↓ ↓HSince␈α∞a␈α
full-blown␈α
parser␈α
for␈α
AL␈α
programs␈α
has␈α
yet␈α
to␈α
be␈α
implemented,␈α
an␈α
input␈α
syntax␈α
somewhat␈↓ ↓H
␈↓ ↓H␈ββ@␈↓␈↓ ↓Hresembling␈αLISP␈αs-expressions␈αhas␈αbeen␈αsupplied␈αas␈αan␈αinterim␈αmeasure.␈αThe␈αbasic␈αelements␈αin␈αthis␈↓ ↓H
␈↓ ↓H␈ββh␈↓␈↓ ↓Hsyntax␈α
are␈α
atomic␈α
symbols␈α
and␈α
forms␈α
like:␈↓ ↓H
␈↓ αK␈β∧⊂␈↓␈↓ αK␈↓ αK
␈↓ αK␈β∧8␈↓(<keyword> <e1> <e2> ... <ek> )␈↓ αK
␈↓ ↓H␈β∧`␈↓␈↓ ↓H␈↓ ↓H
␈↓ ↓H␈β¬λ␈↓␈↓ ↓Hwhich␈α∞correspond␈α∞in␈α∞a␈α∞more␈α∞or␈α∞less␈α
one-to-one␈α
manner␈α
with␈α
the␈α
record␈α
structures␈α
used␈α
inside␈α
the␈↓ ↓H
␈↓ ↓H␈β¬0␈↓␈↓ ↓Hcompiler.␈α
For␈α
instance,␈α
the␈α
program␈↓ ↓H
␈↓ αK␈β¬X␈↓␈↓ αK␈↓ αK
␈↓ αK␈βε␈↓BEGIN␈↓ αK
␈↓ αK␈βε(␈↓    FRAME a,b;ROTN r;TRANS t;␈↓ αK
␈↓ αK␈βεP␈↓    r←ROT(YHAT,180*DEG);␈↓ αK
␈↓ αK␈βεx␈↓    a ← FRAME(r,VECTOR(0,0,2));␈↓ αK
␈↓ αK␈βπ ␈↓    MOVE YELLOW TO FRAME(r,VECTOR(1,0,2));␈↓ αK
␈↓ αK␈βπH␈↓    b ← FRAME(r,VECTOR(0,0,3));␈↓ αK
␈↓ αK␈βπp␈↓    AFFIX a TO YELLOW BY t RIGIDLY;␈↓ αK
␈↓ αK␈βλ_␈↓    MOVE a TO b;␈↓ αK
␈↓ αK␈βλ@␈↓    MOVE a TO b*TRANS(ROT(XHAT,90*DEG),VECTOR(1,1,1));␈↓ αK
␈↓ αK␈βλh␈↓    UNFIX a FROM YELLOW;␈↓ αK
␈↓ αK␈β	⊂␈↓    MOVE YELLOW TO YPARK;␈↓ αK
␈↓ αK␈β	8␈↓END;␈↓ αK
␈↓ ↓H␈β	`␈↓␈↓ ↓H␈↓ ↓H
␈↓ ↓H␈β
λ␈↓would be written as ␈↓ ↓H
␈↓ αK␈β
0␈↓␈↓ αK␈↓ αK
␈↓ αK␈β
X␈↓(PR␈↓ αK
␈↓ αK␈β␈↓  (BL (FVAR a b)(RVAR r)(TVAR t)␈↓ αK
␈↓ αK␈β(␈↓    (AS r (RMAKE YHAT (SSMUL 180 DEG)))␈↓ αK
␈↓ αK␈βP␈↓    (AS a (FMAKE r (VMAKE 0 0 2)))␈↓ αK
␈↓ αK␈βx␈↓    (MO YARM (FMAKE r (VMAKE 1 0 2)))␈↓ αK
␈↓ αK␈β ␈↓    (AS b (FMAKE r (VMAKE 0 0 3)))␈↓ αK
␈↓ αK␈βH␈↓    (AFFIX a YARM t () RIGIDLY)␈↓ αK
␈↓ αK␈βp␈↓    (MO a b)␈↓ αK
␈↓ αK␈β
_␈↓    (MO a (TTMUL b (TMAKE (AXW_ROTN XHAT (SSMUL 90 DEG))(VMAKE 1 1 1))))␈↓ αK
␈↓ αK␈β
@␈↓    (UNFIX a YARM)␈↓ αK
␈↓ αK␈β
h␈↓    (MO YARM YPARK)␈↓ αK
␈↓ αK␈β∞⊂␈↓  )␈↓ αK
␈↓ αK␈β∞8␈↓ )␈↓ αK
␈↓ ↓H␈β∞`␈↓␈↓ ↓H␈↓ ↓H
␈↓ ↓H␈β∂λ␈↓␈↓ ↓HGenerally␈αspeaking,␈αthe␈αsemantics␈αof␈αthe␈αvarious␈α
language␈α
constructs␈α
have␈α
remained␈α
pretty␈α
much␈α
the␈↓ ↓H
␈↓ ↓H␈β∂0␈↓␈↓ ↓Hsame␈α∂as␈α∂given␈α∂in␈α∞AIM-243,␈α∞␈↓↓AL,␈α∞A␈α∞Programming␈α∞System␈α∞for␈α∞Automation␈↓,␈α∞and␈α∞familiarity␈α∞with␈α∞that␈↓ ↓H
␈↓ F␈β∂l␈↓α[1]
␈↓ D␈β↓␈↓α[2]
␈↓ ↓H␈β↓H␈↓␈↓ ↓Hdocument␈α∞is␈α∞assumed.␈α∞However,␈α∞there␈α∞are␈α∞some␈α∞differences,␈α∞as␈α∞is␈α∞to␈α∞be␈α
expected␈α
with␈α
an␈α
evolving␈↓ ↓H
␈↓ ↓H␈β↓p␈↓␈↓ ↓Hsystem,␈α⊃and␈α⊃many␈α⊃of␈α⊃the␈α⊃features␈α⊃of␈α⊃AL␈α⊃do␈α⊃not␈α⊃yet␈α⊃have␈α⊃any␈α⊃corresponding␈α⊃"s-expression";␈α⊂as␈↓ ↓H
␈↓ ↓H␈βα_␈↓␈↓ ↓Himplementation␈α
proceeds,␈α
these␈α
will␈α
be␈α
added.␈↓ ↓H
␈↓ D␈β↓␈↓α[3]
␈↓ ↓H␈β↓H␈↓␈↓ ¬b␈↓εInput format␈↓␈↓ ↓H
␈↓ ↓H␈β↓x␈↓␈↓ ↓H
␈↓ ↓H␈βα ␈↓␈↓αAtomic Symbols␈↓␈↓ ↓H
␈↓ ↓H␈βαH␈↓␈↓ ↓H
␈↓ ↓H␈βαp␈↓Examples:␈↓ αK"This is a string."␈↓ ↓H
␈↓ ↓H␈ββ_␈↓␈↓ αKident␈↓ ↓H
␈↓ ↓H␈ββ@␈↓␈↓ αK3.14159␈↓ ↓H
␈↓ ↓H␈ββh␈↓␈↓ ↓H
␈↓ ↓H␈β∧⊂␈↓␈↓ ↓HAtomic␈α⊃symbols␈α⊃include␈α⊃identifiers␈α⊃(discussed␈α⊃below),␈α⊃real␈α⊃numbers,␈α⊃string␈α⊂constants,␈α⊂and␈α⊂certain␈↓ ↓H
␈↓ ↓H␈β∧8␈↓␈↓ ↓Hspecial␈α
characters␈α
(such␈α
as␈α
"≠").␈↓ ↓H
␈↓ ↓H␈β∧`␈↓␈↓ ↓H
␈↓ ↓H␈β¬λ␈↓␈↓αIdentifiers␈↓␈↓ ↓H
␈↓ ↓H␈β¬0␈↓␈↓ ↓H
␈↓ ↓H␈β¬X␈↓Examples:␈↓ αKx␈↓ ↓H
␈↓ ↓H␈βε␈↓␈↓ α_␈↓ αKABC102␈↓ ↓H
␈↓ ↓H␈βε(␈↓␈↓ α_␈↓ αKa_very_long_identifier␈↓ ↓H
␈↓ ↓H␈βεP␈↓␈↓ ↓H
␈↓ ↓H␈βεx␈↓␈↓ ↓HIdentifiers␈α⊃are␈α⊃used␈α⊃as␈α⊃variables,␈α⊃labels,␈α⊃keywords,␈α⊃and␈α⊃names␈α⊃for␈α⊃certain␈α⊃predeclared␈α⊂constants.␈↓ ↓H
␈↓ ↓H␈βπ ␈↓␈↓ ↓HIdentifiers␈αconsist␈αof␈αa␈αletter␈αfollowed␈αby␈αany␈αstring␈αof␈αletters␈αand␈αdigits,␈αFor␈αthis␈αpurpose␈αthe␈α
special␈↓ ↓H
␈↓ ↓H␈βπH␈↓␈↓ ↓Hcharacter␈α"_"␈αis␈αtreated␈αlike␈αa␈αletter.␈αAll␈αletters␈αare␈αcoerced␈α
to␈α
upper␈α
case␈α
on␈α
input;␈α
thus,␈α
"foo",␈α
"FOO"␈↓ ↓H
␈↓ ↓H␈βπp␈↓␈↓ ↓Hand␈α"Foo"␈αare␈αall␈αthe␈αsame␈αidentifier.␈αThis␈αmanual␈αwill␈αuse␈αupper␈αcase␈αletters␈αto␈αindicate␈α"reserved"␈↓ ↓H
␈↓ ↓H␈βλ_␈↓␈↓ ↓Hidentifiers,␈α
and␈αlower␈αcase␈αto␈αindicate␈αeverything␈αelse.␈αIn␈αgeneral,␈αa␈αnon-reserved␈αidentifier␈αmust␈αbe␈↓ ↓H
␈↓ ↓H␈βλ@␈↓␈↓ ↓Hdeclared␈α(either␈αin␈αa␈αvariable␈αdeclaration␈αor␈αby␈αusing␈αit␈αas␈αa␈αlabel)␈αbefore␈αbeing␈αused␈αin␈αa␈αprogram.␈↓ ↓H
␈↓ ↓H␈βλh␈↓␈↓ ↓HHowever,␈αif␈αan␈α
undefined␈α
identifier␈α
is␈α
used␈α
in␈α
a␈α
context␈α
where␈α
a␈α
variable␈α
is␈α
expected,␈α
the␈α
system␈α
will␈↓ ↓H
␈↓ ↓H␈β	⊂␈↓␈↓ ↓Hmake␈α
an␈α
implicit␈α
declaration␈α
for␈α
it␈α
and␈α
print␈α
a␈α
message␈α
to␈α
the␈α
user.␈α
For␈α
instance,␈↓ ↓H
␈↓ αK␈β	8␈↓␈↓ αK␈↓ αK
␈↓ αK␈β	`␈↓(AS y 10)␈↓ αK
␈↓ ↓H␈β
λ␈↓␈↓ ↓H␈↓ ↓H
␈↓ ↓H␈β
0␈↓␈↓ ↓Hwould␈α∞print␈α∞out␈α∞"Y␈α∞declared␈α∞a␈α∞scalar␈α∞variable".␈α∞However,␈α∞this␈α∞facility␈α∞should␈α∞be␈α∞viewed␈α∞as␈α∞a␈α∞bug␈↓ ↓H
␈↓ ↓H␈β
X␈↓␈↓ ↓Hrecovery␈αmechanism␈αand␈αnot␈αas␈αthe␈αpreferred␈αway␈αto␈αdeclare␈αvariables.␈αNo␈αpromisses␈αare␈αmade␈αthat␈↓ ↓H
␈↓ ↓H␈β␈↓␈↓ ↓Hsuch␈α∞declarations␈α∞will␈α∞always␈α∞work␈α
correctly.␈α
WARNING:␈α
Attempts␈α
to␈α
redefine␈α
reserved␈α
identifiers␈↓ ↓H
␈↓ ↓H␈β(␈↓␈↓ ↓H(keywords,␈α
predeclared␈α
variables,␈α
and␈α
predeclared␈α
constants)␈α
will␈α
not␈α
work␈α
correctly.␈↓ ↓H
␈↓ ↓H␈βP␈↓␈↓ ↓H
␈↓ ↓H␈βx␈↓␈↓αStructure forms␈↓␈↓ ↓H
␈↓ ↓H␈β ␈↓␈↓ ↓H
␈↓ ↓H␈βH␈↓Syntax:␈↓ αK(<keyword> <element1> ... <element n>)␈↓ ↓H
␈↓ ↓H␈βp␈↓␈↓ α_␈↓ αK(<label> <keyword> <element 1> ... <element n>)␈↓ ↓H
␈↓ ↓H␈β
_␈↓␈↓ ↓H
␈↓ ↓H␈β
@␈↓Examples:␈↓ αK(SVAR x y z)␈↓ ↓H
␈↓ ↓H␈β
h␈↓␈↓ α_␈↓ αK(foo ON e1 (AS x 1))␈↓ ↓H
␈↓ ↓H␈β∞⊂␈↓␈↓ ↓H
␈↓ ↓H␈β∞8␈↓␈↓ ↓HThe␈αtwo␈αforms␈αare␈αequivalent,␈αexcept␈αthat␈α<label>,␈αif␈αit␈αappears,␈αmay␈αbe␈αused␈αsubsequently␈αto␈αrefer␈↓ ↓H
␈↓ ↓H␈β∞`␈↓␈↓ ↓Hto␈αthe␈αsemantic␈αentity␈αdefined␈αby␈αthe␈αform.␈α<label>␈αmust␈αhave␈αbeen␈αpreviously␈αdeclared␈αas␈αa␈α"label"␈↓ ↓H
␈↓ ↓H␈β∂λ␈↓␈↓ ↓Hvariable␈α
of␈α
the␈α
appropriate␈α
kind.␈↓ ↓H
␈↓ A␈β↓␈↓α[4]
␈↓ ↓H␈β↓H␈↓␈↓ ∧ ␈↓εPredeclared variables and constants␈↓␈↓ ↓H
␈↓ ↓H␈β↓x␈↓␈↓ ↓H
␈↓ ↓H␈βα ␈↓␈↓αVariables␈↓␈↓ ↓H
␈↓ ↓H␈βαH␈↓␈↓ ↓H
␈↓ ↓H␈βαp␈↓␈↓ ↓HYARM,␈α⊂BARM␈α⊂--␈α⊂Frame␈α⊂variables␈α⊂corresponding␈α⊂to␈α∂the␈α∂location␈α∂of␈α∂the␈α∂YELLOW␈α∂and␈α∂BLUE␈↓ ↓H
␈↓ ↓H␈ββ_␈↓␈↓ ↓Harms␈α∩(actually,␈α∩the␈α∩location␈α⊃and␈α⊃orientation␈α⊃of␈α⊃a␈α⊃coordinate␈α⊃system␈α⊃tacked␈α⊃onto␈α⊃the␈α⊃end␈α⊃of␈α⊃the␈↓ ↓H
␈↓ ↓H␈ββ@␈↓␈↓ ↓HYELLOW␈α
and␈α
BLUE␈α
hands,␈α
respectively).␈α
Used␈α
as␈α
device␈α
names␈α
for␈α
MOVE␈α
statements.␈↓ ↓H
␈↓ ↓H␈ββh␈↓␈↓ ↓H
␈↓ ↓H␈β∧⊂␈↓␈↓ ↓HYHAND,␈α∂BHAND␈α∂--␈α∂Scalar␈α∂variables␈α∂giving␈α∂the␈α∂opening␈α∞of␈α∞the␈α∞YELLOW␈α∞and␈α∞BLUE␈α∞fingers.␈↓ ↓H
␈↓ ↓H␈β∧8␈↓␈↓ ↓HUsed␈α
as␈α
device␈α
names␈α
for␈α
"operate"␈α
statements.␈↓ ↓H
␈↓ ↓H␈β∧`␈↓␈↓ ↓H
␈↓ ↓H␈β¬λ␈↓␈↓ ↓HOLDV,␈α⊃NEWV␈α⊃--␈α⊃Hold␈α⊂the␈α⊂old␈α⊂and␈α⊂new␈α⊂values␈α⊂for␈α⊂a␈α⊂variable␈α⊂when␈α⊂a␈α⊂"changer"␈α⊂is␈α⊂invoked.␈↓ ↓H
␈↓ ↓H␈β¬0␈↓␈↓ ↓HActually,␈αthese␈αmight␈αbe␈αbetter␈αreferred␈αto␈αas␈α"variable-like"␈αentities,␈αsince␈αtheir␈αtype,␈αetc.,␈αdepend␈αon␈↓ ↓H
␈↓ ↓H␈β¬X␈↓␈↓ ↓Hwhat␈α
"changer"␈α
they␈α
appear␈α
in.␈↓ ↓H
␈↓ ↓H␈βε␈↓␈↓ ↓H
␈↓ ↓H␈βε(␈↓␈↓ ↓HAFFIXED␈α
--␈α
Atom␈α
used␈α
in␈α
AFFIXED␈α
pattern␈↓ ↓H
␈↓ ↓H␈βεP␈↓␈↓ ↓H
␈↓ ↓H␈βεx␈↓␈↓ ↓HRIGIDLY,␈α⊂NONRIGIDLY␈α⊂--␈α⊂Atoms␈α⊂that␈α⊂appear␈α∂in␈α∂AFFIXED␈α∂patterns␈α∂and␈α∂which␈α∂are␈α∂used␈α∂to␈↓ ↓H
␈↓ ↓H␈βπ ␈↓␈↓ ↓Hspecify␈α
kind␈α
of␈α
affixment␈α
in␈α
an␈α
AFFIX␈α
statement.␈↓ ↓H
␈↓ ↓H␈βπH␈↓␈↓ ↓H
␈↓ ↓H␈βπp␈↓␈↓αConstants␈↓␈↓ ↓H
␈↓ ↓H␈βλ_␈↓␈↓ ↓H
␈↓ αK␈βλ@␈↓␈↓ αK␈↓ αK
␈↓ αK␈βλh␈↓PI = 3.141592653␈↓ αK
␈↓ αK␈β	⊂␈↓DEG = PI/180␈↓ αK
␈↓ αK␈β	8␈↓XHAT = VECTOR(1,0,0)␈↓ αK
␈↓ αK␈β	`␈↓YHAT = VECTOR(0,1,0)␈↓ αK
␈↓ αK␈β
λ␈↓ZHAT = VECTOR(0,0,1)␈↓ αK
␈↓ αK␈β
0␈↓NILVECT = VECTOR(0,0,0)␈↓ αK
␈↓ αK␈β
X␈↓NILROTN = ROT(ZHAT,0)␈↓ αK
␈↓ αK␈β␈↓NILTRANS = TRANS(NILROTN,NILVECT)␈↓ αK
␈↓ αK␈β(␈↓STATION = FRAME(NILROTN,NILVECT)␈↓ αK
␈↓ αK␈βP␈↓YPARK = parking place for YELLOW arm␈↓ αK
␈↓ αK␈βx␈↓BPARK = parking place for BLUE arm␈↓ αK
␈↓ ↓H␈β ␈↓␈↓ ↓H␈↓ ↓H
␈↓ C␈β↓␈↓α[5]
␈↓ ↓H␈β↓H␈↓␈↓ ¬l␈↓εDeclarations␈↓␈↓ ↓H
␈↓ ↓H␈β↓x␈↓␈↓ ↓H
␈↓ ↓H␈βα ␈↓Syntax:␈↓ αK(<declarator> <id1> <id2> ... <idn>)␈↓ ↓H
␈↓ ↓H␈βαH␈↓Example:␈↓ αK(SVAR x y z)␈↓ ↓H
␈↓ ↓H␈βαp␈↓␈↓ ↓H
␈↓ ↓H␈ββ_␈↓␈↓ ↓HCauses␈α⊂variables␈α⊂<id1>,␈α⊂...,␈α∂<idn>␈α∂to␈α∂be␈α∂declared␈α∂with␈α∂the␈α∂type␈α∂specified␈α∂by␈α∂<declarator>␈α∂as␈α∂local␈↓ ↓H
␈↓ ↓H␈ββ@␈↓␈↓ ↓Hvariables␈α⊂to␈α⊂the␈α⊂current␈α⊂block.␈α⊂Declarations␈α⊂may␈α∂appear␈α∂anywhere␈α∂a␈α∂statement␈α∂is␈α∂legal␈α∂(although␈↓ ↓H
␈↓ ↓H␈ββh␈↓␈↓ ↓Hsome␈α∂places␈α∂--␈α∂such␈α∂as␈α∞the␈α∞body␈α∞of␈α∞an␈α∞"on␈α∞monitor"␈α∞--␈α∞don't␈α∞make␈α∞a␈α∞lot␈α∞of␈α∞sense.)␈α∞In␈α∞particular,␈↓ ↓H
␈↓ ↓H␈β∧⊂␈↓␈↓ ↓Hstatements␈α
and␈α
declarations␈α
may␈α
be␈α
intermixed␈α
within␈α
a␈α
block.␈α
However,␈α
a␈α
declaration␈αonly␈αaffects␈↓ ↓H
␈↓ ↓H␈β∧8␈↓␈↓ ↓Hthose␈αstatements␈αthat␈α
come␈α
after␈α
it␈α
within␈α
the␈α
block.␈α
Thus,␈α
if␈α
a␈α
variable␈α
is␈α
used␈α
within␈α
a␈α
block␈α
before␈↓ ↓H
␈↓ ↓H␈β∧`␈↓␈↓ ↓Hits␈α
declaration␈α
appears,␈α
then␈α
its␈α
next␈α
"higher"␈α
declaration␈α
will␈α
be␈α
used.␈α
For␈α
instance:␈↓ ↓H
␈↓ αK␈β¬λ␈↓␈↓ αK␈↓ αK
␈↓ αK␈β¬0␈↓(BL (SVAR x y)␈↓ αK
␈↓ αK␈β¬X␈↓    (BL (AS x 3)␈↓ αK
␈↓ αK␈βε␈↓        (SVAR x)␈↓ αK
␈↓ αK␈βε(␈↓        (AS x 4)␈↓ αK
␈↓ αK␈βεP␈↓        )␈↓ αK
␈↓ αK␈βεx␈↓    (AS y x)␈↓ αK
␈↓ αK␈βπ ␈↓    )␈↓ αK
␈↓ ↓H␈βπH␈↓␈↓ ↓H␈↓ ↓H
␈↓ ↓H␈βπp␈↓␈↓ ↓Hwill␈α
set␈α
variable␈α
"y"␈α
to␈α
3.␈↓ ↓H
␈↓ ↓H␈βλ_␈↓␈↓ ↓H
␈↓ ↓H␈βλ@␈↓␈↓ ↓HLegal␈α
<declarator>s␈α
are:␈↓ ↓H
␈↓ αK␈βλh␈↓␈↓ αK␈↓ αK
␈↓ αK␈β	⊂␈↓SVAR -- Scalar variable␈↓ αK
␈↓ αK␈β	8␈↓VVAR -- Vector variable␈↓ αK
␈↓ αK␈β	`␈↓RVAR -- Rotation variable␈↓ αK
␈↓ αK␈β
λ␈↓TVAR -- Trans variable␈↓ αK
␈↓ αK␈β
0␈↓FVAR -- Frame variable␈↓ αK
␈↓ αK␈β
X␈↓ATOM -- Atom variable␈↓ αK
␈↓ αK␈β␈↓EVAR -- Event variable␈↓ αK
␈↓ αK␈β(␈↓WVAR -- World name␈↓ αK
␈↓ αK␈βP␈↓ONLAB -- Condition monitor label␈↓ αK
␈↓ αK␈βx␈↓CLCLAB -- Calculator label␈↓ αK
␈↓ αK␈β ␈↓CHGLAB -- Changer label␈↓ αK
␈↓ αK␈βH␈↓STMLAB -- Statement label␈↓ αK
␈↓ ↓H␈βp␈↓␈↓ ↓H␈↓ ↓H
␈↓ ↓H␈β
_␈↓␈↓ ↓HNOTE:␈α⊂Internally,␈α⊂AL␈α⊂associates␈α⊂a␈α⊂unique␈α⊂print␈α∂name␈α∂with␈α∂every␈α∂variable␈α∂by␈α∂tacking␈α∂the␈α∂block␈↓ ↓H
␈↓ ↓H␈β
@␈↓␈↓ ↓Hname␈α∀on␈α∀in␈α∀front␈α∀of␈α∀the␈α∀variable␈α∀name.␈α∀Block␈α∪names␈α∪are␈α∪generated␈α∪from␈α∪an␈α∪internal␈α∪block␈↓ ↓H
␈↓ ↓H␈β
h␈↓␈↓ ↓Hnumbering␈αand␈αhave␈αthe␈αform␈α"$$B1",␈α"$$B2",␈αetc.␈αThus,␈αour␈αlittle␈αexample␈αabove␈αwould␈αhave␈α
three␈↓ ↓H
␈↓ ↓H␈β∞⊂␈↓␈↓ ↓Hscalar␈α∞variables␈α
$$B1.X,␈α
$$B1.Y,␈α
and␈α
$$B2.X.␈α
When␈α
a␈α
program␈α
is␈α
printed␈α
out,␈α
the␈α
internal␈α
names␈↓ ↓H
␈↓ ↓H␈β∞8␈↓␈↓ ↓Hfor␈α
the␈α
variables␈α
are␈α
given.␈↓ ↓H
␈↓ ↓H␈β∞`␈↓␈↓ ↓H
␈↓ D␈β↓␈↓α[6]
␈↓ ↓H␈β↓H␈↓␈↓ ¬-␈↓εGlobal Declarations␈↓␈↓ ↓H
␈↓ ↓H␈β↓x␈↓␈↓ ↓H
␈↓ ↓H␈βα ␈↓Syntax:␈↓ αK(GVAR <declaration 1> <declaration 2> ... <declaration n>)␈↓ ↓H
␈↓ ↓H␈βαH␈↓Example:␈↓ αK(GVAR (TVAR t1 t2) (FVAR a b) )␈↓ ↓H
␈↓ ↓H␈βαp␈↓␈↓ ↓H
␈↓ ↓H␈ββ_␈↓␈↓ ↓HGlobal␈αvariables␈αare␈αprovided␈αto␈αfacilitate␈αchaining␈αtogether␈αseveral␈αshort␈αAL␈αprograms␈αto␈αproduce␈↓ ↓H
␈↓ ↓H␈ββ@␈↓␈↓ ↓Hlonger␈α∀sequences.␈α∀Normally,␈α∀whenever␈α∀a␈α∀block␈α∀is␈α∀exited,␈α∀all␈α∪variables␈α∪local␈α∪to␈α∪that␈α∪block␈α∪are␈↓ ↓H
␈↓ ↓H␈ββh␈↓␈↓ ↓Hdestroyed,␈α
as␈α
are␈α
any␈α
graph␈α
structure␈α
affixments␈α
that␈α
depend␈α
on␈α
them.␈α
This␈αmeans␈αthat␈αonce␈αyour␈↓ ↓H
␈↓ ↓H␈β∧⊂␈↓␈↓ ↓Hprogram␈α∂has␈α∂run,␈α∂all␈α∞traces␈α∞of␈α∞its␈α∞effects␈α∞would␈α∞be␈α∞lost␈α∞from␈α∞the␈α∞runtime␈α∞environment␈α∞(except,␈α∞of␈↓ ↓H
␈↓ ↓H␈β∧8␈↓␈↓ ↓Hcourse,␈αfor␈αthe␈αfinal␈αposition␈αof␈αthe␈αarms␈αand␈αother␈αsimilar␈α"real␈αworld"␈αchanges").␈αGlobal␈αvariables,␈↓ ↓H
␈↓ ↓H␈β∧`␈↓␈↓ ↓Hon␈αthe␈αother␈αhand,␈αare␈αkept␈αon␈αa␈αseparate␈αlist␈α(the␈α"global␈αvariable␈αstore")␈αwhich␈αis␈α"owned"␈αby␈αthe␈↓ ↓H
␈↓ ↓H␈β¬λ␈↓␈↓ ↓Hruntime␈α∞system,␈α∞and␈α∞are␈α∞never␈α∞deallocated.␈α∞However,␈α∞a␈α∞given␈α∞global␈α∞may␈α∞only␈α∞be␈α
referenced␈α
from␈↓ ↓H
␈↓ ↓H␈β¬0␈↓␈↓ ↓Hinside␈α
a␈α
block␈α
in␈α
which␈α
it␈α
is␈α
declared.␈α
For␈α
instance,␈α
in␈↓ ↓H
␈↓ αK␈β¬X␈↓␈↓ αK␈↓ αK
␈↓ αK␈βε␈↓(BL (FVAR a)␈↓ αK
␈↓ αK␈βε(␈↓    (BL (GVAR (FVAR b))␈↓ αK
␈↓ αK␈βεP␈↓        (AS a b) (COMMENT ok)␈↓ αK
␈↓ αK␈βεx␈↓        )␈↓ αK
␈↓ αK␈βπ ␈↓    (AS a b) (COMMENT illegal)␈↓ αK
␈↓ αK␈βπH␈↓    )␈↓ αK
␈↓ ↓H␈βπp␈↓␈↓ ↓H␈↓ ↓H
␈↓ ↓H␈βλ_␈↓␈↓ ↓Hthe␈α⊂first␈α⊂assignment␈α∂statement␈α∂is␈α∂legal,␈α∂but␈α∂the␈α∂second␈α∂is␈α∂not.␈α∂The␈α∂first␈α∂time␈α∂a␈α∂global␈α∂variable␈α∂is␈↓ ↓H
␈↓ ↓H␈βλ@␈↓␈↓ ↓Haccessed␈αfrom␈αwithin␈αa␈αblock␈αwhere␈αit␈α
is␈α
declared,␈α
the␈α
global␈α
variable␈α
store␈α
is␈α
searched␈α
for␈α
a␈α
variable␈↓ ↓H
␈↓ ↓H␈βλh␈↓␈↓ ↓Hwith␈α
the␈α
same␈α
print␈α
name␈α
as␈αthat␈αgiven␈αin␈αthe␈αglobal␈αdeclaration.␈α(Note:␈αthis␈αis␈αone␈αcase␈αwhere␈αthe␈↓ ↓H
␈↓ ↓H␈β	⊂␈↓␈↓ ↓Hvariable's␈α⊃declared␈α⊃id,␈α⊃rather␈α⊃than␈α⊃its␈α⊃unique␈α⊃internal␈α⊃id␈α⊂is␈α⊂used.␈α⊂Thus,␈α⊂in␈α⊂our␈α⊂example,␈α⊂"b"␈α⊂is␈↓ ↓H
␈↓ ↓H␈β	8␈↓␈↓ ↓Hsearched␈α∩for.)␈α∩If␈α∩the␈α∩variable␈α⊃is␈α⊃not␈α⊃found,␈α⊃then␈α⊃storage␈α⊃for␈α⊃the␈α⊃variable␈α⊃is␈α⊃allocated,␈α⊃and␈α⊃the␈↓ ↓H
␈↓ ↓H␈β	`␈↓␈↓ ↓Happropriate␈αentries␈αare␈αmade␈αin␈αthe␈αstore.␈α
In␈α
any␈α
event,␈α
a␈α
pointer␈α
to␈α
the␈α
variable␈α
is␈α
returned␈α
and␈α
put␈↓ ↓H
␈↓ ↓H␈β
λ␈↓␈↓ ↓Haway␈αwhere␈αthe␈αblock␈αcan␈αfind␈αit.␈αSubsequent␈αattempts␈αto␈αaccess␈αthe␈αvariable␈αwill␈αbe␈αable␈αto␈αuse␈αthis␈↓ ↓H
␈↓ ↓H␈β
0␈↓␈↓ ↓Hpointer,␈α
so␈α
that␈α
the␈α
store␈α
does␈αnot␈αhave␈αto␈αbe␈αsearched␈αrepeatedly␈αfor␈αthe␈αsame␈αvariable.␈αExecution␈↓ ↓H
␈↓ ↓H␈β
X␈↓␈↓ ↓Hfor␈α⊂the␈α⊂block␈α⊂proceeds␈α⊂normally,␈α⊂except␈α⊂that␈α⊂on␈α⊂block␈α⊂exit␈α∂the␈α∂pointer␈α∂to␈α∂the␈α∂variable␈α∂is␈α∂merely␈↓ ↓H
␈↓ ↓H␈β␈↓␈↓ ↓Hdropped,␈α
and␈α
nothing␈α
is␈α
done␈α
to␈α
the␈α
variable␈α
itself.␈↓ ↓H
␈↓ ↓H␈β(␈↓␈↓ ↓H
␈↓ ↓H␈βP␈↓␈↓ ↓HWARNING:␈α⊃In␈α⊃the␈α⊃present␈α⊃implementation,␈α⊃NO␈α⊂TYPE␈α⊂CHECKING␈α⊂is␈α⊂done␈α⊂when␈α⊂linking␈α⊂up␈↓ ↓H
␈↓ ↓H␈βx␈↓␈↓ ↓Hglobal␈αvariables.␈αThis␈αmeans␈αthat␈αyou␈αcan␈αlose␈αin␈αa␈αbig␈αway␈αif␈αyou␈αhave␈αa␈αglobal␈αvariable␈αdeclared␈↓ ↓H
␈↓ ↓H␈β ␈↓␈↓ ↓Has,␈α
say,␈α
a␈α
TVAR␈α
in␈α
one␈α
place,␈α
and␈α
an␈α
SVAR␈α
in␈α
another.␈↓ ↓H
␈↓ ↓H␈βH␈↓␈↓ ↓H
␈↓ ↓H␈βp␈↓␈↓ ↓H
␈↓ ↓H␈β
_␈↓␈↓ ↓H
␈↓ ↓H␈β
@␈↓␈↓ ↓HAs␈α
already␈α
mentioned,␈α
one␈α
principal␈α
use␈α
for␈α
global␈α
variables␈αis␈αfacilitating␈αcommunication␈αbetween␈↓ ↓H
␈↓ ↓H␈β
h␈↓␈↓ ↓Hseparately␈αcompiled␈αAL␈α
programs.␈α
Typical␈α
examples␈α
of␈α
this␈α
would␈α
be␈α
chaining␈α
together␈α
several␈α
short␈↓ ↓H
␈↓ ↓H␈β∞⊂␈↓␈↓ ↓Hprograms␈α∪to␈α∪get␈α∪around␈α∪memory␈α∪limitations␈α∪(which␈α∪are␈α∪currently␈α∩rather␈α∩severe)␈α∩or␈α∩interfacing␈↓ ↓H
␈↓ ↓H␈β∞8␈↓␈↓ ↓Hbetween␈αseveral␈αsemi-autonomous␈α
functions,␈α
such␈α
as␈α
a␈α
pick-and-place␈α
module␈α
and␈α
assembly␈α
modules␈↓ ↓H
␈↓ ↓H␈β∞`␈↓␈↓ ↓Hfor␈α∃two␈α∃different␈α∀sorts␈α∀of␈α∀part.␈α∀Another␈α∀eventual␈α∀use␈α∀will␈α∀be␈α∀provision␈α∀of␈α∀a␈α∀communication␈↓ ↓H
␈↓ ↓H␈β∂λ␈↓␈↓ ↓Hmechanism␈α⊃with␈α⊃external␈α⊃programs␈α⊃(e.g.,␈α⊃vision␈α⊃modules)␈α⊃which␈α⊃need␈α⊃to␈α⊃fetch␈α⊃or␈α⊃store␈α⊂variable␈↓ ↓H
␈↓ ↓H␈β∂0␈↓␈↓ ↓Hvalues.␈αThese␈αprograms␈αmay␈αbe␈αliving␈αon␈αeither␈αthe␈αPDP-11␈αor␈αon␈αthe␈αPDP-10.␈αNOTE:␈αPresently,␈↓ ↓H
␈↓ D␈β↓␈↓α[7]
␈↓ ↓H␈β↓H␈↓␈↓ ↓Hcompiler␈α∃and␈α∃runtime␈α∃facilities␈α∃for␈α∃supporting␈α∃global␈α∃variables␈α∃are␈α∀not␈α∀completely␈α∀debugged.␈↓ ↓H
␈↓ ↓H␈β↓p␈↓␈↓ ↓HFurthermore,␈α∀the␈α∀runtime␈α∀system␈α∀facilities␈α∀for␈α∀chaining␈α∀together␈α∀several␈α∀programs␈α∪aren't␈α∪fully␈↓ ↓H
␈↓ ↓H␈βα_␈↓␈↓ ↓Himplemented.␈α⊃This␈α⊃means␈α⊃that␈α⊃global␈α⊂variables␈α⊂really␈α⊂aren't␈α⊂too␈α⊂useful␈α⊂quite␈α⊂yet,␈α⊂although␈α⊂their␈↓ ↓H
␈↓ ↓H␈βα@␈↓␈↓ ↓Happearance␈αwithin␈αa␈αprogram␈αwon't␈αcause␈αit␈αto␈αblow␈αup␈α(as␈αfar␈αas␈αwe␈αknow).␈αBeat␈αon␈αyour␈αlocal␈αAL␈↓ ↓H
␈↓ ↓H␈βαh␈↓␈↓ ↓Hhackers␈α
to␈α
get␈α
this␈α
finished.␈↓ ↓H
␈↓ C␈β↓␈↓α[8]
␈↓ ↓H␈β↓H␈↓␈↓ ¬,␈↓εControl Statements␈↓␈↓ ↓H
␈↓ ↓H␈β↓x␈↓␈↓ ↓H
␈↓ ↓H␈βα ␈↓␈↓αBlock␈↓␈↓ ↓H
␈↓ ↓H␈βαH␈↓␈↓ ↓H
␈↓ ↓H␈βαp␈↓Syntax:␈↓ αK(BL <statement 1> <statement 2> ... <statement n>)␈↓ ↓H
␈↓ ↓H␈ββ_␈↓Example:␈↓ αK(BL (SVAR x) (AS x 2) (SVAR y) (AS x y) )␈↓ ↓H
␈↓ ↓H␈ββ@␈↓␈↓ ↓H
␈↓ ↓H␈ββh␈↓␈↓ ↓HCorresponds␈α
to␈α
the␈α
classical␈α
ALGOL␈α
block/compound␈α
statement.␈αAs␈αmentioned␈αbefore,␈αdeclarations␈↓ ↓H
␈↓ ↓H␈β∧⊂␈↓␈↓ ↓Hmay␈α
be␈α
interspersed␈α
freely␈α
with␈α
executable␈α
statements,␈α
but␈αonly␈αaffect␈αthose␈αstatements␈αin␈αthe␈αblock␈↓ ↓H
␈↓ ↓H␈β∧8␈↓␈↓ ↓Hthat␈α
occur␈α
after␈α
the␈α
declaration.␈↓ ↓H
␈↓ ↓H␈β∧`␈↓␈↓ ↓H
␈↓ ↓H␈β¬λ␈↓␈↓αCoblock␈↓␈↓ ↓H
␈↓ ↓H␈β¬0␈↓␈↓ ↓H
␈↓ ↓H␈β¬X␈↓Syntax:␈↓ αK(CO <statement 1> <statement 2> ... <statement n> )␈↓ ↓H
␈↓ ↓H␈βε␈↓Example:␈↓ αK(CO (MO YARM YPARK) (MO BARM BPARK) )␈↓ ↓H
␈↓ ↓H␈βε(␈↓␈↓ ↓H
␈↓ ↓H␈βεP␈↓␈↓ ↓HCorresponds␈α~to␈α~the␈α~AL␈α~"COBEGIN␈α~...␈α~COEND"␈α~construct.␈α→The␈α→statements␈α→are␈α→executed␈↓ ↓H
␈↓ ↓H␈βεx␈↓␈↓ ↓Hconcurrently,␈αand␈αthe␈αcoblock␈αdoes␈αnot␈αterminate␈αuntil␈αall␈αthe␈αconstituent␈αstatements␈αterminate.␈αNote␈↓ ↓H
␈↓ ↓H␈βπ ␈↓␈↓ ↓Hthat␈αa␈αcoblock␈αis␈αNOT␈αa␈αblock.␈αAlthough␈αit␈αis␈αlegal␈αfor␈α
one␈α
of␈α
the␈α
statements␈α
to␈α
be␈α
a␈α
declaration,␈α
the␈↓ ↓H
␈↓ ↓H␈βπH␈↓␈↓ ↓Hlocal␈α
variables␈α
so␈α
declared␈α
will␈α
be␈α
added␈α
to␈α
the␈α
block␈α
in␈α
which␈α
the␈α
coblock␈α
appears.␈↓ ↓H
␈↓ ↓H␈βπp␈↓␈↓ ↓H
␈↓ ↓H␈βλ_␈↓␈↓αConditional statement␈↓␈↓ ↓H
␈↓ ↓H␈βλ@␈↓␈↓ ↓H
␈↓ ↓H␈βλh␈↓Syntax:␈↓ αK(IF <condition> <"then" statement> <"else" statement> )␈↓ ↓H
␈↓ ↓H␈β	⊂␈↓Example:␈↓ αK(IF (SLE x 4) (MO YARM a) (MO BARM a))␈↓ ↓H
␈↓ ↓H␈β	8␈↓␈↓ α_␈↓ αK(IF (SEQ x 5) (MO BARM BPARK))␈↓ ↓H
␈↓ ↓H␈β	`␈↓␈↓ ↓H
␈↓ ↓H␈β
λ␈↓␈↓ ↓HCorresponds␈αto␈αthe␈αclassical␈α"IF␈α...␈α
THEN␈α
...␈α
ELSE".␈α
Note␈α
that␈α
the␈α
<"else"␈α
statement>␈α
may␈α
be␈α
omitted.␈↓ ↓H
␈↓ ↓H␈β
0␈↓␈↓ ↓HCurrently␈α
the␈α
<condition>␈α
expressions␈α
allowed␈α
are:␈↓ ↓H
␈↓ αK␈β
X␈↓␈↓ αK␈↓ αK
␈↓ αK␈β␈↓(SLT e1 e2) -- e1 < e2␈↓ αK
␈↓ αK␈β(␈↓(SLE e1 e2) -- e1 ≤ e2␈↓ αK
␈↓ αK␈βP␈↓(SEQ e1 e2) -- e1 = e2␈↓ αK
␈↓ αK␈βx␈↓(SNE e1 e2) -- e1 ≠ e2␈↓ αK
␈↓ αK␈β ␈↓(SGE e1 e2) -- e1 ≥ e2␈↓ αK
␈↓ αK␈βH␈↓(SGT e1 e2) -- e1 > e2␈↓ αK
␈↓ ↓H␈βp␈↓␈↓ ↓H␈↓ ↓H
␈↓ ↓H␈β
_␈↓where e1 and e2 are scalar-valued expressions.  Soon to be added:␈↓ ↓H
␈↓ αK␈β
@␈↓␈↓ αK␈↓ αK
␈↓ αK␈β
h␈↓(EQL e1 e2)␈↓ αK
␈↓ αK␈β∞⊂␈↓(NEQ e1 e2)␈↓ αK
␈↓ ↓H␈β∞8␈↓␈↓ ↓H␈↓ ↓H
␈↓ ↓H␈β∞`␈↓␈↓ ↓Hwhere␈α
e1␈α
and␈α
e2␈α
may␈α
be␈α
any␈α
arithmetic␈α
type␈α
(so␈α
long␈α
as␈α
they␈α
have␈α
the␈α
same␈α
type).␈α
Also:␈↓ ↓H
␈↓ αK␈β∂λ␈↓␈↓ αK␈↓ αK
␈↓ αK␈β∂0␈↓(AND <condition 1> <condition 2>)␈↓ αK
␈↓ 
A␈β↓␈↓α[9]
␈↓ αK␈β↓H␈↓(OR <condition 1> <condition 2>)␈↓ αK
␈↓ αK␈β↓p␈↓(NOT <condition>)␈↓ αK
␈↓ ↓H␈βα_␈↓␈↓ ↓H␈↓ ↓H
␈↓ ↓H␈βα@␈↓␈↓αCompile-time conditionals␈↓␈↓ ↓H
␈↓ ↓H␈βαh␈↓␈↓ ↓H
␈↓ ↓H␈ββ⊂␈↓Syntax:␈↓ αK(CIF <condition> <"then" statement> <"else" statement> )␈↓ ↓H
␈↓ ↓H␈ββ8␈↓Example:␈↓ αK(CIF (SLE (NOMV x) 4) (MO YARM a) (MO BARM a))␈↓ ↓H
␈↓ ↓H␈ββ`␈↓␈↓ ↓H
␈↓ ↓H␈β∧λ␈↓␈↓ ↓HCorresponds␈α
to␈α
the␈α
"PLAN␈α
IF"␈α
construct␈α
in␈αAL.␈αJust␈αlike␈αregular␈αconditional␈αstatement␈αexcept␈αthat␈↓ ↓H
␈↓ ↓H␈β∧0␈↓␈↓ ↓Hthe␈α
<condition>␈α
must␈α
be␈α
constant␈α
and␈α
that␈α
only␈α
code␈α
for␈α
the␈α
"true"␈α
part␈α
will␈α
be␈α
emitted.␈↓ ↓H
␈↓ ↓H␈β∧X␈↓␈↓ ↓H
␈↓ ↓H␈β¬␈↓␈↓ ↓HNOTE:␈αThis␈αmay␈αgo␈αaway,␈αin␈αwhich␈αcase␈αthe␈αcompiler␈αwill␈αautomatically␈αdetect␈αconstant␈αconditions␈↓ ↓H
␈↓ ↓H␈β¬(␈↓␈↓ ↓Hand␈α
take␈α
appropriate␈α
actions.␈↓ ↓H
␈↓ ↓H␈β¬P␈↓␈↓ ↓H
␈↓ ↓H␈β¬x␈↓␈↓αLoop statements␈↓␈↓ ↓H
␈↓ ↓H␈βε ␈↓␈↓ ↓H
␈↓ ↓H␈βεH␈↓Syntax:␈↓ αK(WH <condition> <statement>)␈↓ ↓H
␈↓ ↓H␈βεp␈↓␈↓ α_␈↓ αK(FO <scalar variable> <initial value> <step value> <final value> <statement>)␈↓ ↓H
␈↓ ↓H␈βπ_␈↓Example:␈↓ αK(WH (SLT x 3) (BL (MO a b) (AS x (SADD x 1)) )␈↓ ↓H
␈↓ ↓H␈βπ@␈↓␈↓ α_␈↓ αK(FO x 1 1 10 (MO a (FMAKE NILROT (VMAKE x x x))) )␈↓ ↓H
␈↓ ↓H␈βπh␈↓␈↓ ↓H
␈↓ ↓H␈βλ⊂␈↓These correspond to the usual ALGOL-like WHILE and FOR loops.␈↓ ↓H
␈↓ ↓H␈βλ8␈↓␈↓ ↓H
␈↓ ↓H␈βλ`␈↓␈↓αCondition monitors␈↓␈↓ ↓H
␈↓ ↓H␈β	λ␈↓␈↓ ↓H
␈↓ ↓H␈β	0␈↓Syntax:␈↓ αK(ON <condition> <statement> )␈↓ ↓H
␈↓ ↓H␈β	X␈↓Example:␈↓ αK(ON (SGT t 3) (MO BARM b) )␈↓ ↓H
␈↓ ↓H␈β
␈↓␈↓ ↓H
␈↓ ↓H␈β
(␈↓␈↓ ↓HCorresponds␈αto␈αthe␈αAL␈α"ON␈α<condition>␈αDO␈α<statement>".␈αThe␈α<condition>␈αmust␈αhave␈αthe␈αform␈α
of␈↓ ↓H
␈↓ ↓H␈β
P␈↓␈↓ ↓Ha␈α⊂simple␈α⊂comparison␈α⊂involving␈α⊂scalars,␈α⊂etc.,␈α⊂or␈α⊂else␈α⊂must␈α⊂be␈α∂an␈α∂event␈α∂variable.␈α∂Check␈α∂with␈α∂your␈↓ ↓H
␈↓ ↓H␈β
x␈↓␈↓ ↓Hfriendly␈α
local␈α
AL␈α
hackers␈α
about␈α
all␈α
this.␈↓ ↓H
␈↓ ↓H␈β ␈↓␈↓ ↓H
␈↓ ↓H␈βH␈↓␈↓αProgram␈↓␈↓ ↓H
␈↓ ↓H␈βp␈↓␈↓ ↓H
␈↓ ↓H␈β_␈↓Syntax:␈↓ αK(PR <statement> )␈↓ ↓H
␈↓ ↓H␈β@␈↓Example:␈↓ αK(PR (BL (MO YARM YPARK) (MO BARM BPARK) ))␈↓ ↓H
␈↓ ↓H␈βh␈↓␈↓ ↓H
␈↓ ↓H␈β
⊂␈↓␈↓ ↓HThis␈α"statement"␈αis␈αprovided␈αfor␈αthe␈αconvenience␈αof␈αthe␈αAL␈αcompiler.␈αAll␈αyou␈α
have␈α
to␈α
know␈α
about␈α
it␈↓ ↓H
␈↓ ↓H␈β
8␈↓␈↓ ↓His␈αto␈αput␈α
(PR␈α
...␈α
)␈α
around␈α
any␈α
AL␈α
program␈α
you␈α
wish␈α
to␈α
have␈α
compiled.␈α
In␈α
other␈α
words,␈α
the␈α
"top␈α
level"␈↓ ↓H
␈↓ ↓H␈β
`␈↓␈↓ ↓Hof␈αany␈αs-expression␈αyou␈αwish␈αAL␈αto␈αcompile␈α
must␈α
be␈α
a␈α
program.␈α
Presently,␈α
that␈α
is␈α
the␈α
only␈α
place␈α
this␈↓ ↓H
␈↓ ↓H␈β∞λ␈↓␈↓ ↓Hform␈α
should␈α
appear.␈↓ ↓H
␈↓ ↓H␈β∞0␈↓␈↓ ↓H
␈↓ 8␈β↓␈↓α[10]
␈↓ ↓H␈β↓H␈↓␈↓ ∧q␈↓εDevice control statements␈↓␈↓ ↓H
␈↓ ↓H␈β↓x␈↓␈↓ ↓H
␈↓ ↓H␈βα ␈↓␈↓αMove statement␈↓␈↓ ↓H
␈↓ ↓H␈βαH␈↓␈↓ ↓H
␈↓ ↓H␈βαp␈↓Syntax:␈↓ αK(MO <frame variable> <dest expr> <clause 1> ... <clause n>)␈↓ ↓H
␈↓ ↓H␈ββ_␈↓Examples:␈↓ αK(MO YARM a)␈↓ ↓H
␈↓ ↓H␈ββ@␈↓␈↓ α_ ␈↓ αK(MO BARM (TTMUL BPARK t))␈↓ ↓H
␈↓ ↓H␈ββh␈↓␈↓ α_ ␈↓ αK(MO a b (VIA (TTMUL a t1)) (VIA c) (ON e3 (EV e4 +)) )␈↓ ↓H
␈↓ ↓H␈β∧⊂␈↓␈↓ ↓H
␈↓ ↓H␈β∧8␈↓␈↓ ↓HThis␈α
construct␈α
defines␈α
a␈α
single-manipulator␈α
motion␈α
statement.␈α
Here,␈α
the␈α
<frame␈α
variable>␈α
must␈α
be␈↓ ↓H
␈↓ ↓H␈β∧`␈↓␈↓ ↓Hcontrollable␈αin␈αthe␈αenvironment␈αof␈αthe␈αmotion␈αstatement,␈αand␈αthe␈α<dest␈αexpression>␈αmust␈αevaluate␈α
to␈↓ ↓H
␈↓ ↓H␈β¬λ␈↓␈↓ ↓Heither␈α∞a␈α∞frame␈α∞or␈α∞trans.␈α∞(In␈α∞the␈α∞latter␈α∞case,␈α∞AL␈α
assumes␈α
that␈α
STATION*<dest␈α
expr>␈α
is␈α
meant.)␈α
A␈↓ ↓H
␈↓ ↓H␈β¬0␈↓␈↓ ↓Hframe␈αvariable␈αis␈αcontrollable␈αif␈αit␈αis␈αone␈αof␈αthe␈αarm␈αframes␈α(YARM␈αand␈αBARM)␈αor␈αif␈αit␈αis␈αaffixed␈↓ ↓H
␈↓ ↓H␈β¬X␈↓␈↓ ↓Hto␈α
a␈α
controllable␈α
frame.␈α
For␈α
instance,␈α
after␈α
a␈α
sequence␈α
like␈↓ ↓H
␈↓ αK␈βε␈↓␈↓ αK␈↓ αK
␈↓ αK␈βε(␈↓(FVAR a b c d e f)␈↓ αK
␈↓ αK␈βεP␈↓(TVAR t1 t2 t3 t4 t5)␈↓ αK
␈↓ αK␈βεx␈↓(AFFIX a YARM t1 () NONRIGIDLY )␈↓ αK
␈↓ αK␈βπ ␈↓(AFFIX a b t2 () RIGIDLY)␈↓ αK
␈↓ αK␈βπH␈↓(AFFIX c d t3 () RIGIDLY)␈↓ αK
␈↓ αK␈βπp␈↓(AFFIX d e t4 () NONRIGIDLY)␈↓ αK
␈↓ αK␈βλ_␈↓(AFFIX d BARM t5 () RIGIDLY)␈↓ αK
␈↓ ↓H␈βλ@␈↓␈↓ ↓H␈↓ ↓H
␈↓ ↓H␈βλh␈↓␈↓ ↓H
␈↓ ↓H␈β	⊂␈↓␈↓ ↓Hframes␈αa,␈αb,␈αc,␈αd,␈αYARM,␈αand␈αBARM␈αwill␈αall␈αbe␈αcontrollable,␈αwhile␈αe␈αand␈αf␈αwill␈αnot.␈αIn␈αcases␈αwhere␈↓ ↓H
␈↓ ↓H␈β	8␈↓␈↓ ↓Hthe␈α<frame>␈αis␈αnot␈αone␈αof␈αthe␈αarms,␈αthe␈αcompiler␈αuses␈αits␈αplanning␈αmodel␈αof␈αthe␈αaffixment␈αstructure␈↓ ↓H
␈↓ ↓H␈β	`␈↓␈↓ ↓Hto␈α∞determine␈α∞which␈α
arm␈α
is␈α
to␈α
be␈α
moved␈α
and␈α
modifies␈α
the␈α
<destination␈α
expression>␈α
to␈α
produce␈α
the␈↓ ↓H
␈↓ ↓H␈β
λ␈↓␈↓ ↓Hcorrect␈α
effect.␈α
For␈α
instance,␈↓ ↓H
␈↓ αK␈β
0␈↓␈↓ αK␈↓ αK
␈↓ αK␈β
X␈↓(MO a YPARK)␈↓ αK
␈↓ ↓H␈β␈↓␈↓ ↓H␈↓ ↓H
␈↓ ↓H␈β(␈↓is treated like␈↓ ↓H
␈↓ αK␈βP␈↓␈↓ αK␈↓ αK
␈↓ αK␈βx␈↓(MO YARM (TTMUL YPARK (TINVRT t1)) )␈↓ αK
␈↓ ↓H␈β ␈↓␈↓ ↓H␈↓ ↓H
␈↓ ↓H␈βH␈↓Currently, the only <clause> types recognized by the compiler are␈↓ ↓H
␈↓ αK␈βp␈↓␈↓ αK␈↓ αK
␈↓ αK␈β
_␈↓(VIA <dest expr> )␈↓ αK
␈↓ αK␈β
@␈↓(ON <condition> <statement>)␈↓ αK
␈↓ ↓H␈β
h␈↓␈↓ ↓H␈↓ ↓H
␈↓ ↓H␈β∞⊂␈↓␈↓ ↓HThe␈α
VIA␈α
clauses␈α
define␈α
intermediate␈α
locations␈α
through␈α
which␈α
the␈α
motion␈α
must␈α
pass.␈αThe␈αorder␈αof␈↓ ↓H
␈↓ ↓H␈β∞8␈↓␈↓ ↓Hthe␈α
clauses␈α
determines␈α
the␈α
order␈α
of␈α
motion␈α
through␈α
the␈α
points.␈↓ ↓H
␈↓ ↓H␈β∞`␈↓␈↓ ↓H
␈↓ ↓H␈β∂λ␈↓␈↓ ↓HThe␈αON␈αclause␈αis␈αjust␈αlike␈αan␈αON␈αstatement,␈αand␈αis␈αrecognized␈αcorrectly.␈αThe␈αcondition␈αmonitor␈αso␈↓ ↓H
␈↓ ↓H␈β∂0␈↓␈↓ ↓Hdefined␈α
will␈α
only␈α
be␈α
enabled␈α
during␈α
the␈α
motion␈α
statement.␈↓ ↓H
␈↓ :␈β↓␈↓α[11]
␈↓ ↓H␈β↓H␈↓␈↓ ↓H
␈↓ ↓H␈β↓p␈↓␈↓ ↓HOther␈αclause␈αtypes␈α(e.g.,␈αfor␈αFORCE␈αor␈α
TORQUE)␈α
will␈α
be␈α
added␈α
as␈α
these␈α
features␈α
are␈α
put␈α
up␈α
in␈α
the␈↓ ↓H
␈↓ ↓H␈βα_␈↓␈↓ ↓Hruntime␈α
system.␈↓ ↓H
␈↓ ↓H␈βα@␈↓␈↓ ↓H
␈↓ 8␈β↓␈↓α[12]
␈↓ ↓H␈β↓H␈↓␈↓ ∧\␈↓εGraph Structure Statements␈↓␈↓ ↓H
␈↓ ↓H␈β↓x␈↓␈↓ ↓H
␈↓ ↓H␈βα ␈↓␈↓αAffix Statement␈↓␈↓ ↓H
␈↓ ↓H␈βαH␈↓␈↓ ↓H
␈↓ ↓H␈βαp␈↓Syntax:␈↓ αK(AFFIX <frame var 1> <frame var 2> <by var> <at expr> <rigidity>)␈↓ ↓H
␈↓ ↓H␈ββ_␈↓Examples:␈↓ αK(AFFIX f1 f2 t () RIGIDLY)␈↓ ↓H
␈↓ ↓H␈ββ@␈↓␈↓ α_␈↓ αK(AFFIX f1 f2 t (TMAKE NILROTN XHAT) NONRIGIDLY)␈↓ ↓H
␈↓ ↓H␈ββh␈↓␈↓ ↓H
␈↓ ↓H␈β∧⊂␈↓␈↓ ↓HSpecifies␈αaffixment␈αof␈α<frame␈αvar␈α1>␈αto␈α<frame␈αvar␈α2>␈αby␈αthe␈αspecified␈α<by␈αvar>␈α(which␈αmust␈αbe␈αa␈↓ ↓H
␈↓ ↓H␈β∧8␈↓␈↓ ↓HTRANS␈αvariable)␈αat␈αan␈αoffset␈αspecified␈αby␈α<at␈αexpr>.␈αIf␈α<rigidity>␈αis␈αRIGIDLY␈αthen␈αthe␈αaffixment␈↓ ↓H
␈↓ ↓H␈β∧`␈↓␈↓ ↓His␈αassumed␈αto␈αbe␈αsymmetric,␈αso␈αthat␈αmodifying␈αone␈αof␈αthe␈αframe␈αvariables␈αwill␈α
cause␈α
the␈α
other␈α
one␈α
to␈↓ ↓H
␈↓ ↓H␈β¬λ␈↓␈↓ ↓Hbe␈α
modified,␈α
too.␈α
If␈α
<rigidity>␈α
is␈α
NONRIGIDLY,␈α
then␈α
an␈αasymmetric␈αaffixment␈αis␈αmade,␈αin␈αwhich␈↓ ↓H
␈↓ ↓H␈β¬0␈↓␈↓ ↓Hchanging␈α⊃the␈α⊃second␈α⊃frame␈α⊃changes␈α⊂the␈α⊂first,␈α⊂but␈α⊂changing␈α⊂the␈α⊂first␈α⊂causes␈α⊂the␈α⊂<by␈α⊂var>␈α⊂to␈α⊂be␈↓ ↓H
␈↓ ↓H␈β¬X␈↓␈↓ ↓Hmodified.␈α
If␈α
<at␈α
expr>␈α
is␈α
left␈α
null,␈α
as␈α
in␈αour␈αfirst␈αexample,␈αthen␈αa␈αdefault␈αof␈αinv(f2)*f1␈αis␈αassumed.␈↓ ↓H
␈↓ ↓H␈βε␈↓␈↓ ↓HThe␈α
graph␈α
structure␈α
modifications␈α
produced␈α
by␈α
our␈α
first␈α
example␈α
are␈α
thus:␈↓ ↓H
␈↓ αK␈βε(␈↓␈↓ αK␈↓ αK
␈↓ αK␈βεP␈↓(CLCLAB g001 g002)␈↓ αK
␈↓ αK␈βεx␈↓(AS t (TTMUL (TINVRT f2) f1) )␈↓ αK
␈↓ αK␈βπ ␈↓(GAS f1 = (g001 CLC (TTMUL f2 t)) )␈↓ αK
␈↓ αK␈βπH␈↓(GAS f2 = (g001 CLC (TTMUL f1 (TINVRT t))) )␈↓ αK
␈↓ ↓H␈βπp␈↓␈↓ ↓H␈↓ ↓H
␈↓ ↓H␈βλ_␈↓and those for our second example are:␈↓ ↓H
␈↓ αK␈βλ@␈↓␈↓ αK␈↓ αK
␈↓ αK␈βλh␈↓(CLCLAB g003) (CHGLAB g004)␈↓ αK
␈↓ αK␈β	⊂␈↓(AS t (TMAKE NILROTN XHAT) )␈↓ αK
␈↓ αK␈β	8␈↓(GAS f1 = (g003 CLC (TTMUL f2 t)) )␈↓ αK
␈↓ αK␈β	`␈↓(ALSO_DO f1 (goo4 CHG (AS t NEWV)) )␈↓ αK
␈↓ ↓H␈β
λ␈↓␈↓ ↓H␈↓ ↓H
␈↓ ↓H␈β
0␈↓␈↓ ↓Hwhere␈α
g001,␈α
g002,␈α
g003,␈α
and␈α
g004␈α
are␈α
names␈α
invented␈α
by␈α
the␈α
compiler.␈↓ ↓H
␈↓ ↓H␈β
X␈↓␈↓ ↓H
␈↓ ↓H␈β␈↓␈↓ ↓HNOTE:␈αIf␈αthe␈αtwo␈αframe␈αvariables␈αare␈αalready␈α
(directly)␈α
affixed,␈α
then␈α
the␈α
previous␈α
affixment␈α
will␈α
be␈↓ ↓H
␈↓ ↓H␈β(␈↓␈↓ ↓Hundone.␈α∂This␈α∞is␈α∞to␈α∞avoid␈α∞inconsistencies.␈α∞However,␈α∞chains␈α∞of␈α∞affixments␈α∞are␈α∞not␈α∞checked␈α∞for,␈α∞and␈↓ ↓H
␈↓ ↓H␈βP␈↓␈↓ ↓Hmay␈α
get␈α
you␈α
into␈α
trouble.␈↓ ↓H
␈↓ ↓H␈βx␈↓␈↓ ↓H
␈↓ ↓H␈β ␈↓␈↓αUnfix Statement␈↓␈↓ ↓H
␈↓ ↓H␈βH␈↓␈↓ ↓H
␈↓ ↓H␈βp␈↓Syntax:␈↓ αK(UNFIX <frame var 1> <frame var 2> )␈↓ ↓H
␈↓ ↓H␈β
_␈↓Example:␈↓ αK(UNFIX f1 f2)␈↓ ↓H
␈↓ ↓H␈β
@␈↓␈↓ ↓H
␈↓ ↓H␈β
h␈↓␈↓ ↓HThis␈α
statement␈α
causes␈α
the␈α
current␈α
affixment␈α
between␈α
f1␈α
and␈α
f2␈α
to␈α
be␈α
undone.␈αIf␈αf1␈αand␈αf2␈αare␈αnot␈↓ ↓H
␈↓ ↓H␈β∞⊂␈↓␈↓ ↓Hcurrently␈α
affixed,␈α
the␈α
statement␈α
has␈α
no␈α
effect.␈↓ ↓H
␈↓ ↓H␈β∞8␈↓␈↓ ↓H
␈↓ ↓H␈β∞`␈↓␈↓αExplicit graph structure modification␈↓␈↓ ↓H
␈↓ ↓H␈β∂λ␈↓␈↓ ↓H
␈↓ ↓H␈β∂0␈↓␈↓ ↓HThese␈αprimitives␈αallow␈αexplicit␈αmodification␈αto␈αthe␈αgraph␈αstructure␈αassociated␈αwith␈αa␈αvariable.␈αThis␈↓ ↓H
␈↓ 8␈β↓␈↓α[13]
␈↓ ↓H␈β↓H␈↓␈↓ ↓Hcan␈αbe␈αa␈αrather␈αrisky␈αthing␈αto␈αdo,␈αand␈αusers␈αare␈αurged␈αto␈αuse␈αthe␈αaffixment␈αstatements␈αgiven␈αearlier␈↓ ↓H
␈↓ ↓H␈β↓p␈↓␈↓ ↓Hwherever␈α
practical.␈↓ ↓H
␈↓ ↓H␈βα_␈↓␈↓ ↓H
␈↓ ↓H␈βα@␈↓␈↓αCalculator assignment␈↓␈↓ ↓H
␈↓ ↓H␈βαh␈↓␈↓ ↓H
␈↓ ↓H␈ββ⊂␈↓Syntax:␈↓ αK(GAS <var> <op> <calculator> )␈↓ ↓H
␈↓ ↓H␈ββ8␈↓Examples:␈↓ αK(GAS f = (c1 CLC (TTMUL a b)) )␈↓ ↓H
␈↓ ↓H␈ββ`␈↓␈↓ α_␈↓ αK(GAS f ≠ c1 )␈↓ ↓H
␈↓ ↓H␈β∧λ␈↓␈↓ ↓H
␈↓ ↓H␈β∧0␈↓␈↓ ↓Hchanges␈α∪the␈α∪calculator␈α∪list␈α∪for␈α∩variable␈α∩<var>.␈α∩The␈α∩available␈α∩values␈α∩for␈α∩<op>␈α∩are␈α∩"=",␈α∩for␈α∩"is␈↓ ↓H
␈↓ ↓H␈β∧X␈↓␈↓ ↓Hcomputed␈α∞by",␈α∞"≠"␈α
for␈α
"is␈α
no␈α
longer␈α
computed␈α
by",␈α
and␈α
"<"␈α
for␈α
"is␈α
only␈α
computed␈α
by".␈α
<calculator>␈↓ ↓H
␈↓ ↓H␈β¬␈↓␈↓ ↓Hmay␈α
be␈α
either␈α
the␈α
name␈α
of␈α
an␈α
old␈α
calculator␈α
or␈α
a␈α
new␈α
calculator␈α
expression,␈α
given␈α
by␈↓ ↓H
␈↓ αK␈β¬(␈↓␈↓ αK␈↓ αK
␈↓ αK␈β¬P␈↓(<label> CLC <expression> )␈↓ αK
␈↓ ↓H␈β¬x␈↓␈↓ ↓H␈↓ ↓H
␈↓ ↓H␈βε ␈↓␈↓ ↓Hwhich␈αassociates␈αthe␈α<expression>␈αwith␈αthe␈αname␈α<label>.␈αIf␈α<op>␈αis␈α"≠",␈αthen␈αthe␈α<calculator>␈α
better␈↓ ↓H
␈↓ ↓H␈βεH␈↓␈↓ ↓Hbe␈α
the␈αname␈αof␈αsome␈αcalculator␈αpreviously␈αused␈αin␈αa␈αcalculator␈αassignment␈αfor␈α<var>.␈α(Ugh!␈αwhat␈αa␈↓ ↓H
␈↓ ↓H␈βεp␈↓␈↓ ↓Hsentence!).␈↓ ↓H
␈↓ ↓H␈βπ_␈↓␈↓ ↓H
␈↓ ↓H␈βπ@␈↓␈↓αWhen-changing statement␈↓␈↓ ↓H
␈↓ ↓H␈βπh␈↓␈↓ ↓H
␈↓ ↓H␈βλ⊂␈↓Syntax:␈↓ αK(<also_op> <var> <changer> )␈↓ ↓H
␈↓ ↓H␈βλ8␈↓Examples:␈↓ αK(ALSO_DO x (cx CHG AS y x)) )␈↓ ↓H
␈↓ ↓H␈βλ`␈↓␈↓ α_  ␈↓ αK(ALSO_DONT x cx)␈↓ ↓H
␈↓ ↓H␈β	λ␈↓␈↓ ↓H
␈↓ ↓H␈β	0␈↓␈↓ ↓HLike␈α∞calculator␈α∞assignment,␈α∞this␈α∞statement␈α∞makes␈α∞modifications␈α∞to␈α∞the␈α∞graph␈α∞structure␈α
for␈α
variable␈↓ ↓H
␈↓ ↓H␈β	X␈↓␈↓ ↓H<var>.␈α∪Available␈α∪values␈α∪for␈α∪<also_op>␈α∪are␈α∪"ALSO_DO",␈α∪which␈α∪says␈α∪to␈α∪perform␈α∪the␈α∩indicated␈↓ ↓H
␈↓ ↓H␈β
␈↓␈↓ ↓H<changer>␈α⊂whenever␈α⊂<var>␈α⊂is␈α⊂changed,␈α⊂"ALSO_DONT",␈α⊂which␈α⊂undoes␈α∂a␈α∂particular␈α∂ALSO_DO,␈↓ ↓H
␈↓ ↓H␈β
(␈↓␈↓ ↓Hand␈α∞"ALSO_ONLY",␈α
which␈α
undoes␈α
all␈α
previous␈α
ALSO_DOs␈α
and␈α
then␈α
does␈α
an␈α
ALSO_DO␈α
on␈α
its␈↓ ↓H
␈↓ ↓H␈β
P␈↓␈↓ ↓Hargument.␈α∞<changer>␈α∞may␈α∞be␈α∞either␈α∞the␈α∞name␈α∞of␈α∞a␈α∞previous␈α∞change␈α∞action,␈α∞or␈α∞else␈α∞may␈α∞be␈α
a␈α
new␈↓ ↓H
␈↓ ↓H␈β
x␈↓␈↓ ↓Haction,␈α
specified␈α
by␈↓ ↓H
␈↓ αK␈β ␈↓␈↓ αK␈↓ αK
␈↓ αK␈βH␈↓(<label> CHG <statement> )␈↓ αK
␈↓ ↓H␈βp␈↓␈↓ ↓H␈↓ ↓H
␈↓ ↓H␈β_␈↓␈↓ ↓HThe␈α
special␈α
tokens␈α
OLDV␈α
and␈α
NEWV␈α
may␈α
be␈α
used␈α
to␈α
refer␈α
to␈α
the␈α
old␈α
and␈α
new␈α
values␈α
of␈α
<var>.␈↓ ↓H
␈↓ ↓H␈β@␈↓␈↓ ↓H
␈↓ 5␈β↓␈↓α[14]
␈↓ ↓H␈β↓H␈↓␈↓ ∧z␈↓εMiscellaneous statements␈↓␈↓ ↓H
␈↓ ↓H␈β↓x␈↓␈↓ ↓H
␈↓ ↓H␈βα ␈↓␈↓αAssignment statement␈↓␈↓ ↓H
␈↓ ↓H␈βαH␈↓␈↓ ↓H
␈↓ ↓H␈βαp␈↓Syntax:␈↓ αK(AS <var> <expression> )␈↓ ↓H
␈↓ ↓H␈ββ_␈↓Example:␈↓ αK(AS t1 (TTMUL t2 t3))␈↓ ↓H
␈↓ ↓H␈ββ@␈↓␈↓ ↓H
␈↓ ↓H␈ββh␈↓␈↓ ↓HComputes␈αthe␈αvalue␈αof␈α<expression>␈αand␈αstores␈αit␈αaway␈αin␈α<var>.␈αAny␈αgraph␈αnodes␈αthat␈αdepend␈αon␈↓ ↓H
␈↓ ↓H␈β∧⊂␈↓␈↓ ↓H<var>␈αwill␈αbe␈αinvalidated,␈αand␈αany␈α"changers"␈αfor␈α<var>␈αwill␈αbe␈αcalled.␈αIf␈α<var>␈αis␈αof␈αtype␈α<frame>␈↓ ↓H
␈↓ ↓H␈β∧8␈↓␈↓ ↓Hand␈α
<expression>␈α
produces␈α
a␈α
trans,␈α
then␈α
STATION*<expression>␈α
is␈α
assumed.␈↓ ↓H
␈↓ ↓H␈β∧`␈↓␈↓ ↓H
␈↓ ↓H␈β¬λ␈↓␈↓αEvent signal and wait␈↓␈↓ ↓H
␈↓ ↓H␈β¬0␈↓␈↓ ↓H
␈↓ ↓H␈β¬X␈↓Syntax:␈↓ αK(EV <event var> <op> )␈↓ ↓H
␈↓ ↓H␈βε␈↓Examples:␈↓ αK(EV e1 + )␈↓ ↓H
␈↓ ↓H␈βε(␈↓␈↓ α_ ␈↓ αK(EV e2 - )␈↓ ↓H
␈↓ ↓H␈βεP␈↓␈↓ ↓H
␈↓ ↓H␈βεx␈↓␈↓ ↓HThe␈α
"+"␈α
form␈α
says␈α
to␈α
signal␈α
the␈α
event␈α
specified␈α
by␈α
<event␈α
var>,␈α
and␈α
"-"␈α
says␈α
to␈α
wait␈α
for␈αthe␈αevent␈↓ ↓H
␈↓ ↓H␈βπ ␈↓␈↓ ↓Hspecified␈α
by␈α
<event␈α
var>.␈↓ ↓H
␈↓ 7␈β↓␈↓α[15]
␈↓ ↓H␈β↓H␈↓␈↓ ∧L␈↓εStatements that emit no code.␈↓␈↓ ↓H
␈↓ ↓H␈β↓x␈↓␈↓ ↓H
␈↓ ↓H␈βα ␈↓␈↓αSource file requests␈↓␈↓ ↓H
␈↓ ↓H␈βαH␈↓␈↓ ↓H
␈↓ ↓H␈βαp␈↓Syntax:␈↓ αK(DSKIN <fileid>)␈↓ ↓H
␈↓ ↓H␈ββ_␈↓Example:␈↓ αK(DSKIN "P5.AL[HAL,RHT]")␈↓ ↓H
␈↓ ↓H␈ββ@␈↓␈↓ ↓H
␈↓ ↓H␈ββh␈↓␈↓ ↓Hcauses␈αthe␈αspecified␈αfile␈αto␈αbe␈αopened␈αfor␈αreading.␈αOne␈α"s-expression"␈αis␈αthen␈αread␈αfrom␈αthe␈αfile␈α
and␈↓ ↓H
␈↓ ↓H␈β∧⊂␈↓␈↓ ↓Hsubstituted␈α
for␈α
the␈α
DSKIN␈α
statement.␈α
You␈α
are␈α
STRONGLY␈α
urged␈α
only␈α
to␈α
use␈αthis␈αconstruct␈αfrom␈↓ ↓H
␈↓ ↓H␈β∧8␈↓␈↓ ↓Hthe␈α
very␈α
top␈α
level␈α
of␈α
AL␈α
(I.e.,␈α
where␈α
input␈α
from␈α
the␈α
TTY␈α
is␈α
being␈α
requested).␈α
Otherwise,␈α
you␈α
will␈↓ ↓H
␈↓ ↓H␈β∧`␈↓␈↓ ↓Hbecome␈α
very␈α
confused.␈α
Please␈αnote␈αthat␈αthe␈αspecified␈αfile␈αremains␈αopen␈αfor␈αinput␈αafter␈αthe␈αprogram␈↓ ↓H
␈↓ ↓H␈β¬λ␈↓␈↓ ↓Hhas␈αbeen␈αread␈αin.␈αThis␈αmeans␈αthat␈αseveral␈αAL␈αprograms␈αmay␈αbe␈αplaced␈αin␈αone␈αfile.␈αPresumably,␈αthe␈↓ ↓H
␈↓ ↓H␈β¬0␈↓␈↓ ↓Hcompiler␈α∩will␈α∩then␈α∩do␈α∩the␈α⊃"right"␈α⊃thing,␈α⊃although␈α⊃it␈α⊃may␈α⊃wind␈α⊃up␈α⊃overwriting␈α⊃all␈α⊃but␈α⊃the␈α⊃last␈↓ ↓H
␈↓ ↓H␈β¬X␈↓␈↓ ↓Hprogram␈α
read␈αin␈α(Complain␈αto␈αRF␈αabout␈αthis).␈αAlso,␈αnote␈αthat␈αif␈αthe␈αfile␈αcontains␈αless␈αthan␈αa␈αwhole␈↓ ↓H
␈↓ ↓H␈βε␈↓␈↓ ↓Hprogram␈α
(Typically,␈α
because␈α
you␈α
have␈α
forgotten␈α
some␈α
right␈α
parentheses),␈α
AL␈α
reverts␈α
to␈α
input␈αfrom␈↓ ↓H
␈↓ ↓H␈βε(␈↓␈↓ ↓Hthe␈α
TTY␈α
(prompting␈α
you␈α
with␈α
another␈α
"*").␈↓ ↓H
␈↓ ↓H␈βεP␈↓␈↓ ↓H
␈↓ ↓H␈βεx␈↓␈↓αComments␈↓␈↓ ↓H
␈↓ ↓H␈βπ ␈↓␈↓ ↓H
␈↓ ↓H␈βπH␈↓Syntax:␈↓ αK(COMMENT <anything> )␈↓ ↓H
␈↓ ↓H␈βπp␈↓Example:␈↓ αK(COMMENT this is a comment )␈↓ ↓H
␈↓ ↓H␈βλ_␈↓␈↓ ↓H
␈↓ ↓H␈βλ@␈↓␈↓ ↓HThe␈α∞entire␈α∞construct␈α∞is␈α∞treated␈α∞like␈α∞a␈α∞null␈α∞statement.␈α
Note␈α
that␈α
this␈α
is␈α
not␈α
quite␈α
the␈α
same␈α
thing␈α
as␈↓ ↓H
␈↓ ↓H␈βλh␈↓␈↓ ↓Hbeing␈α
ignored␈α
entirely.␈α
For␈α
instance,␈↓ ↓H
␈↓ αK␈β	⊂␈↓␈↓ αK␈↓ αK
␈↓ αK␈β	8␈↓(IF (SGT x 2)␈↓ αK
␈↓ αK␈β	`␈↓        (COMMENT You think this will be ignored)␈↓ αK
␈↓ αK␈β
λ␈↓        (AS x 2)␈↓ αK
␈↓ αK␈β
0␈↓        (AS x 1)␈↓ αK
␈↓ αK␈β
X␈↓        )␈↓ αK
␈↓ ↓H␈β␈↓␈↓ ↓H␈↓ ↓H
␈↓ ↓H␈β(␈↓won't do what you probably mean it to.  Sorry.␈↓ ↓H
␈↓ ↓H␈βP␈↓␈↓ ↓H
␈↓ ↓H␈βx␈↓␈↓αArithmetic assertions␈↓␈↓ ↓H
␈↓ ↓H␈β ␈↓␈↓ ↓H
␈↓ ↓H␈βH␈↓Syntax:␈↓ αK(ASSERT (AF <var> <reln> <value> ) <worldid> )␈↓ ↓H
␈↓ ↓H␈βp␈↓Example:␈↓ αK(ASSERT (AF YARM = YPARK) )␈↓ ↓H
␈↓ ↓H␈β
_␈↓␈↓ ↓H
␈↓ ↓H␈β
@␈↓␈↓ ↓HCurrently,␈αthe␈αonly␈αallowed␈α<reln>␈αis␈α"=",␈αwhich␈αis␈αused␈αfor␈αplanning␈αvalue␈αassignment.␈α<worldid>␈α
is␈↓ ↓H
␈↓ ↓H␈β
h␈↓␈↓ ↓Hused␈αto␈αspecify␈αa␈αparticular␈αplanning␈α"world".␈αIf␈αit␈αis␈αleft␈αblank,␈αthen␈αthe␈αcurrent␈αworld␈αwill␈αbe␈αused.␈↓ ↓H
␈↓ ↓H␈β∞⊂␈↓␈↓ ↓H(Usually,␈α∞this␈α∞is␈α∞what␈α∞you␈α
want).␈α
Planning␈α
values␈α
may␈α
be␈α
retrieved␈α
by␈α
use␈α
of␈α
the␈α
(NOMV␈α
<var>)␈↓ ↓H
␈↓ ↓H␈β∞8␈↓␈↓ ↓Hconstruct.␈α
(NOTE:␈α
"AF"␈α
is␈α
mnemonic␈α
for␈α
"arithmetic␈α
fact").␈↓ ↓H
␈↓ ↓H␈β∞`␈↓␈↓ ↓H
␈↓ ↓H␈β∂λ␈↓␈↓αSymbolic assertions␈↓␈↓ ↓H
␈↓ ↓H␈β∂0␈↓␈↓ ↓H
␈↓ 8␈β↓␈↓α[16]
␈↓ ↓H␈β↓H␈↓Syntax:␈↓ αK(ASSERT (SF <token 1> <token 2> ... <token n> ) <worldid> )␈↓ ↓H
␈↓ ↓H␈β↓p␈↓Examples:␈↓ αK(ASSERT (SF gripper_device vise1 ))␈↓ ↓H
␈↓ ↓H␈βα_␈↓␈↓ α_␈↓ αK(ASSERT (SF DEPROACH f1 (TMAKE NILROTN ZHAT)))␈↓ ↓H
␈↓ ↓H␈βα@␈↓␈↓ ↓H
␈↓ ↓H␈βαh␈↓␈↓ ↓HUsed␈α∪to␈α∪add␈α∪symbolic␈α∪assertions␈α∪to␈α∩the␈α∩AL␈α∩compiler's␈α∩database.␈α∩Again,␈α∩the␈α∩current␈α∩"world"␈α∩is␈↓ ↓H
␈↓ ↓H␈ββ⊂␈↓␈↓ ↓Hassumed␈α
as␈α
a␈α
default␈α
for␈α
<worldid>.␈α
(NOTE:␈α
"SF"␈α
is␈α
mnemonic␈α
for␈α
"symbolic␈α
fact".)␈↓ ↓H
␈↓ ↓H␈ββ8␈↓␈↓ ↓H
␈↓ ↓H␈ββ`␈↓␈↓αDenials␈↓␈↓ ↓H
␈↓ ↓H␈β∧λ␈↓␈↓ ↓H
␈↓ ↓H␈β∧0␈↓Syntax:␈↓ αK(DENY (AF <var> = <value> ) <worldid> )␈↓ ↓H
␈↓ ↓H␈β∧X␈↓␈↓ α_␈↓ αK(DENY (SF <token 1> ... <token n>) <worldid>)␈↓ ↓H
␈↓ ↓H␈β¬␈↓Example:␈↓ αK(DENY (SF DEPROACH f1 (TMAKE NILROTN ZHAT)))␈↓ ↓H
␈↓ ↓H␈β¬(␈↓␈↓ ↓H
␈↓ ↓H␈β¬P␈↓Used to remove facts from the planning model for world <worldid>.␈↓ ↓H
␈↓ ↓H␈β¬x␈↓␈↓ ↓H
␈↓ ↓H␈βε ␈↓␈↓αWorld declaration␈↓␈↓ ↓H
␈↓ ↓H␈βεH␈↓␈↓ ↓H
␈↓ ↓H␈βεp␈↓Syntax:␈↓ αK(NW <worldid>)␈↓ ↓H
␈↓ ↓H␈βπ_␈↓Example:␈↓ αK(NW australia)␈↓ ↓H
␈↓ ↓H␈βπ@␈↓␈↓ ↓H
␈↓ ↓H␈βπh␈↓Sets the current planning "world" to be <worldid>.␈↓ ↓H
␈↓ ↓H␈βλ⊂␈↓␈↓ ↓H
␈↓ ↓H␈βλ8␈↓␈↓αDebugging requests␈↓␈↓ ↓H
␈↓ ↓H␈βλ`␈↓␈↓ ↓H
␈↓ ↓H␈β	λ␈↓Syntax:␈↓ αK(PVL (<var 1> <var 2> ... <var n>) <worldid> )␈↓ ↓H
␈↓ ↓H␈β	0␈↓␈↓ α_␈↓ αK(DBD <worldid> )␈↓ ↓H
␈↓ ↓H␈β	X␈↓Examples:␈↓ αK(PVL (x y a b YARM ) )␈↓ ↓H
␈↓ ↓H␈β
␈↓␈↓ α_␈↓ αK(DBD australia)␈↓ ↓H
␈↓ ↓H␈β
(␈↓␈↓ ↓H
␈↓ ↓H␈β
P␈↓␈↓ ↓HCurrently,␈αthese␈αstatements␈αare␈αuseful␈αprimarily␈αin␈αdebugging␈αthe␈αsimulator.␈αPVL␈α("print␈αvalue␈αlist")␈↓ ↓H
␈↓ ↓H␈β
x␈↓␈↓ ↓Hcauses␈αthe␈αsimulator␈αto␈αprint␈αout␈αit's␈α
current␈α
model␈α
of␈α
the␈α
graph␈α
structure␈α
for␈α
the␈α
named␈α
variables␈α
in␈↓ ↓H
␈↓ ↓H␈β ␈↓␈↓ ↓Hthe␈α
specified␈αplanning␈αworld.␈αDBD␈α("data␈αbase␈αdump")␈αcauses␈αthe␈αall␈αfacts␈αin␈αthat␈αare␈α"true"␈αin␈αthe␈↓ ↓H
␈↓ ↓H␈βH␈↓␈↓ ↓Hnamed␈α∞planning␈α∞world␈α∞to␈α∞be␈α∞printed␈α∞out.␈α∞As␈α∞usual,␈α∞if␈α∞<worldid>␈α
is␈α
ommitted␈α
for␈α
either␈α
statement,␈↓ ↓H
␈↓ ↓H␈βp␈↓␈↓ ↓Hthen␈α
the␈α
current␈α
world␈α
is␈α
assumed.␈↓ ↓H
␈↓ ↓H␈β_␈↓␈↓ ↓H
␈↓ ↓H␈β@␈↓␈↓ ↓HEventually,␈αthere␈αwill␈αdoubtless␈αbe␈αsimilar␈α
statements␈α
to␈α
direct␈α
the␈α
runtime␈α
system␈α
to␈α
print␈α
things␈α
out.␈↓ ↓H
␈↓ ↓H␈βh␈↓␈↓ ↓HAgain,␈α
see␈α
your␈α
local␈α
represenative.␈↓ ↓H
␈↓ 8␈β↓␈↓α[17]
␈↓ ↓H␈β↓H␈↓␈↓ ¬r␈↓εExpressions␈↓␈↓ ↓H
␈↓ ↓H␈β↓x␈↓␈↓ ↓H
␈↓ ↓H␈βα ␈↓Syntax:␈↓ αK(<op> <arg1> <arg2> ... <argn>)␈↓ ↓H
␈↓ ↓H␈βαH␈↓Example:␈↓ αK(SADD 1 2)␈↓ ↓H
␈↓ ↓H␈βαp␈↓␈↓ ↓H
␈↓ ↓H␈ββ_␈↓␈↓ ↓HPresently,␈α∞all␈α∞arithmetic␈α∞operations␈α
take␈α
one,␈α
two,␈α
or␈α
three␈α
arguments,␈α
depending␈α
on␈α
the␈α
operation.␈↓ ↓H
␈↓ ↓H␈ββ@␈↓␈↓ ↓H(i.e.,␈α
things␈α
like␈α
(SADD␈α
1␈α
2␈α
3␈α
4)␈α
don't␈α
work.␈α
).␈α
Values␈α
for␈α
<op>␈α
are␈α
indicated␈α
below.␈↓ ↓H
␈↓ ↓H␈ββh␈↓␈↓ ↓H
␈↓ ↓H␈β∧⊂␈↓␈↓ ↓HNOTATION:␈α"s"␈αmeans␈α"scalar",␈α"v"␈αmeans␈α"vector",␈α"r"␈αmeans␈α"rotation",␈α"t"␈αmeans␈α"trans",␈αand␈α"f"␈↓ ↓H
␈↓ ↓H␈β∧8␈↓␈↓ ↓Hmeans␈αframe.␈αAlso␈αa␈αframe␈α
may␈α
be␈α
used␈α
as␈α
an␈α
argument␈α
anywhere␈α
a␈α
trans␈α
may␈α
be␈α
used.␈α
"*"␈α
indicates␈↓ ↓H
␈↓ ↓H␈β∧`␈↓␈↓ ↓Hthat␈α∞the␈α
operation␈α
isn't␈α
yet␈α
available␈α
in␈α
the␈α
runtime␈α
system.␈α
"**"␈α
indicates␈α
that␈α
it␈α
isn't␈α
available␈α
in␈↓ ↓H
␈↓ ↓H␈β¬λ␈↓␈↓ ↓Hthe␈α
compiler.␈α
It␈α
is␈α
expected␈α
that␈α
these␈α
restrictions␈α
will␈α
disappear␈α
soon.␈↓ ↓H
␈↓ ↓H␈β¬0␈↓␈↓ ↓H
␈↓ ↓H␈β¬X␈↓Scalar-valued expressions:␈↓ ↓H
␈↓ ↓H␈βε␈↓␈↓ ↓H
␈↓ ↓H␈βε(␈↓ ␈↓ αK(SADD s1 s2)␈↓ ∧λ␈↓ εW; s1+s2␈↓ ↓H
␈↓ ↓H␈βεP␈↓ ␈↓ αK(SSUB s1 s2)  ␈↓ εW; s1-s2␈↓ ↓H
␈↓ ↓H␈βεx␈↓ ␈↓ αK(SMUL s1 s2)  ␈↓ εW; s1*s2␈↓ ↓H
␈↓ ↓H␈βπ ␈↓ ␈↓ αK(SNEG s1 )    ␈↓ εW; -s1␈↓ ↓H
␈↓ ↓H␈βπH␈↓ ␈↓ αK(SDIV s1 s2)  ␈↓ εW; s1/s2␈↓ ↓H
␈↓ ↓H␈βπp␈↓**␈↓ αK(SABS s)␈↓ ∧λ␈↓ εW; |s|␈↓ ↓H
␈↓ ↓H␈βλ_␈↓**␈↓ αK(STOS s1 s2)␈↓ ∧λ␈↓ εW; s1↑s2␈↓ ↓H
␈↓ ↓H␈βλ@␈↓ ␈↓ αK(VMAGN v)     ␈↓ εW; |v|␈↓ ↓H
␈↓ ↓H␈βλ↑␈↓ ␈↓ αK(VDOT v1 v2)  ␈↓ εW; v1 ␈↓#
.␈↓# v2␈↓ ↓H
␈↓ ↓H␈β	ε␈↓**␈↓ αK(ANGLE v1 v2)␈↓ ∧X␈↓ εW; arccos(uvect(v1) ␈↓#
.␈↓# uvect(v2))␈↓ ↓H
␈↓ ↓H␈β	8␈↓**␈↓ αK(RMAGN r)␈↓ ∧λ␈↓ εW; (positive) rotation angle of r (see note)␈↓ ↓H
␈↓ ↓H␈β	`␈↓␈↓ ↓H
␈↓ ↓H␈β
λ␈↓Vector-valued expressions:␈↓ ↓H
␈↓ ↓H␈β
0␈↓␈↓ ↓H
␈↓ ↓H␈β
X␈↓␈↓ αK(VMAKE s1 s2 s2)   ␈↓ εW; VECTOR(s1,s2,s3)␈↓ ↓H
␈↓ ↓H␈β␈↓ ␈↓ αK(SVMUL s1 v1)     ␈↓ εW; scales a vector␈↓ ↓H
␈↓ ↓H␈β(␈↓ ␈↓ αK(VADD v1 v2)      ␈↓ εW; v1+v2␈↓ ↓H
␈↓ ↓H␈βP␈↓**␈↓ αK(VSUB v1 v2)␈↓ ∧X   ␈↓ εW; v1-v2␈↓ ↓H
␈↓ ↓H␈βx␈↓*␈↓ αK(RVMUL r v2)␈↓ ∧X   ␈↓ εW; r*v␈↓ ↓H
␈↓ ↓H␈β ␈↓ ␈↓ αK(TVMUL t v)       ␈↓ εW; t*v␈↓ ↓H
␈↓ ↓H␈βH␈↓**␈↓ αK(VCROSS v1 v2)␈↓ ∧X␈↓ εW; cross product of v1 & v2␈↓ ↓H
␈↓ ↓H␈βp␈↓**␈↓ αK(UVECT v)␈↓ ∧λ␈↓ εW; v/magn(v)␈↓ ↓H
␈↓ ↓H␈β
_␈↓**␈↓ αK(AXIS r)␈↓ ∧λ␈↓ εW; rotation axis of r (see note)␈↓ ↓H
␈↓ ↓H␈β
@␈↓**␈↓ αK(POS t)␈↓ ∧λ␈↓ ∧X␈↓ εW; position part of a trans␈↓ ↓H
␈↓ ↓H␈β
h␈↓␈↓ ↓H
␈↓ ↓H␈β∞⊂␈↓Rotation-valued expressions:␈↓ ↓H
␈↓ ↓H␈β∞8␈↓␈↓ ↓H
␈↓ ↓H␈β∞`␈↓*␈↓ αK(AXW_ROTN v s)␈↓ ∧X␈↓ εW; right-handed rotation of s radians about v␈↓ ↓H
␈↓ ↓H␈β∂λ␈↓**␈↓ αK(ORIENT t)␈↓ ∧λ␈↓ εW; rotation part of t␈↓ ↓H
␈↓ ↓H␈β∂0␈↓**␈↓ αK(VTOV v1 v2)␈↓ ∧X␈↓ εW; rotation that takes uvect(v1) into uvect(v2)␈↓ ↓H
␈↓ 7␈β↓␈↓α[18]
␈↓ ↓H␈β↓H␈↓**␈↓ αK(RRMUL r1 r2)␈↓ ∧X␈↓ εW; r1*r2␈↓ ↓H
␈↓ ↓H␈β↓p␈↓**␈↓ αK(RINV r)␈↓ ∧λ␈↓ εW; inverse(r)␈↓ ↓H
␈↓ ↓H␈βα_␈↓**␈↓ αK(VVROT v1 v2)␈↓ ∧X␈↓ εW; rotates ZHAT into uvect(v2) and v1 into v1-v2 plane␈↓ ↓H
␈↓ ↓H␈βα@␈↓␈↓ ↓H
␈↓ ↓H␈βαh␈↓Trans-valued expressions:␈↓ ↓H
␈↓ ↓H␈ββ⊂␈↓␈↓ ↓H
␈↓ ↓H␈ββ8␈↓*␈↓ αK(TMAKE r v)        ␈↓ εW; TRANS(r,v)␈↓ ↓H
␈↓ ↓H␈ββ`␈↓* ␈↓ αK(FTOF f1 f2)      ␈↓ εW; inv(f2)*f1 -- may go away.  do not use.␈↓ ↓H
␈↓ ↓H␈β∧λ␈↓*␈↓ αK(TVADD t v)        ␈↓ εW; TRANS(rotpart(t),v+tranlspart(v))␈↓ ↓H
␈↓ ↓H␈β∧0␈↓*␈↓ αK(TINVRT t)         ␈↓ εW; inverse(t)␈↓ ↓H
␈↓ ↓H␈β∧X␈↓ ␈↓ αK(TTMUL t1 t2)      ␈↓ εW; t1*t2␈↓ ↓H
␈↓ ↓H␈β¬␈↓**␈↓ αK(VVVTRANS v1 v2 v3)␈↓ εW; TRANS(VVROT(v2-v1,v3-v1),v1)␈↓ ↓H
␈↓ ↓H␈β¬(␈↓␈↓ ↓H
␈↓ ↓H␈β¬P␈↓Frame-valued expressions:␈↓ ↓H
␈↓ ↓H␈β¬x␈↓␈↓ ↓H
␈↓ ↓H␈βε ␈↓ ␈↓ αK(FMAKE r v)␈↓ ∧X␈↓ εW; FRAME(r,v)␈↓ ↓H
␈↓ ↓H␈βεH␈↓␈↓ ↓H
␈↓ ↓H␈βεp␈↓␈↓ ↓HNote:␈αROT(AXIS(r),MAGN(r))␈α=␈αr.␈αAXIS(r)␈αand␈αMAGN(r)␈αare␈αextracted␈αassuming␈αa␈αright-handed␈↓ ↓H
␈↓ ↓H␈βπ_␈↓␈↓ ↓Hrotation␈α
(between␈α
0␈α
and␈α
π␈α
radians)␈α
about␈α
the␈α
axis.␈↓ ↓H
␈↓ 8␈β↓␈↓α[19]
␈↓ ↓H␈β↓H␈↓␈↓ β↑␈↓εHow to make your very own AL program.␈↓␈↓ ↓H
␈↓ ↓H␈β↓x␈↓␈↓ ↓H
␈↓ ↓H␈βα ␈↓Don't do any of this without first informing RF or RHT.␈↓ ↓H
␈↓ ↓H␈βαH␈↓␈↓ ↓H
␈↓ ↓H␈βαp␈↓␈↓αTo make the compiler␈↓␈↓ ↓H
␈↓ ↓H␈ββ_␈↓␈↓ ↓HThe␈αlatest␈αversion,␈αwhen␈αthere␈αis␈αone,␈αis␈αAL.DMP[H,RF].␈αUse␈αit␈αif␈αit␈αexists.␈αIf␈αnot,␈α
here␈α
is␈α
the␈α
fastest␈↓ ↓H
␈↓ ↓H␈ββ@␈↓␈↓ ↓Hway␈α
to␈α
load␈α
it:␈↓ ↓H
␈↓ αK␈ββh␈↓␈↓ αK␈↓ αK
␈↓ αK␈β∧⊂␈↓.AL H,RF␈↓ βk␈↓ πZ;alias to RF␈↓ αK
␈↓ αK␈β∧8␈↓.R LOADER 50␈↓ ∧;␈↓ πZ;this way it does not wait for COREGET␈↓ αK
␈↓ αK␈β∧`␈↓*/Y/VAL,TCALC<alt>␈↓ πZ;load RAID, you see.␈↓ αK
␈↓ αK␈β¬λ␈↓.SAV AL␈↓ βk␈↓ ∧;␈↓ πZ;or save it somewhere else if you prefer␈↓ αK
␈↓ αK␈β¬0␈↓.AL␈↓ β≠␈↓ βk␈↓ πZ;alias back␈↓ αK
␈↓ ↓H␈β¬X␈↓␈↓ ↓H␈↓ ↓H
␈↓ ↓H␈βε␈↓␈↓ ↓H
␈↓ ↓H␈βε(␈↓␈↓αTo run the compiler␈↓␈↓ ↓H
␈↓ ↓H␈βεP␈↓␈↓ ↓HThis␈αprogram␈αis␈αa␈αread-parse-stinterp-codegenerate␈αloop.␈αIt␈αbegins␈αby␈αasking␈αOUTPUT␈αTO␈α
TTY?␈↓ ↓H
␈↓ ↓H␈βεx␈↓␈↓ ↓Hand␈α∃OUTPUT␈α∃TO␈α∃FILE?␈α∃I␈α∃usually␈α∃answer␈α∃Y␈α∃and␈α∃N.␈α∃It␈α∀then␈α∀responds␈α∀with␈α∀*.␈α∀Input␈α∀an␈↓ ↓H
␈↓ ↓H␈βπ ␈↓␈↓ ↓Hs-expression,␈α∩and␈α∩as␈α∩soon␈α∩as␈α∩you␈α∩end␈α∩a␈α∩line␈α⊃with␈α⊃a␈α⊃balanced␈α⊃parenthesis,␈α⊃it␈α⊃is␈α⊃compiled.␈α⊃The␈↓ ↓H
␈↓ ↓H␈βπH␈↓␈↓ ↓Hinterpreted␈αs-expression␈αis␈αprinted␈αout␈α(on␈αwhatever␈αoutput␈αdevice␈αyou␈αspecified)␈αand␈αafter␈αcode␈α
has␈↓ ↓H
␈↓ ↓H␈βπp␈↓␈↓ ↓Hbeen␈α
generated,␈α
another␈α
*␈α
appears.␈α
Note␈α
that␈α
one␈α
legal␈α
s-expression␈α
is␈↓ ↓H
␈↓ αK␈βλ_␈↓␈↓ αK␈↓ αK
␈↓ αK␈βλ@␈↓(DSKIN "AL.DAT")␈↓ αK
␈↓ ↓H␈βλh␈↓␈↓ ↓H␈↓ ↓H
␈↓ ↓H␈β	⊂␈↓␈↓ ↓Hthis␈αwill␈αread␈αthe␈αfile␈αAL.DAT␈αand␈αtake␈αinput␈αfrom␈αthere.␈αYou␈αought␈αto␈αlook␈αat␈αthis␈αfile;␈α
it␈α
will␈α
give␈↓ ↓H
␈↓ ↓H␈β	8␈↓␈↓ ↓Hyou␈α∂an␈α∂idea␈α∞of␈α∞what␈α∞the␈α∞s-expressions␈α∞look␈α∞like.␈α∞Code␈α∞is␈α∞generated␈α∞in␈α∞the␈α∞four␈α∞files␈α∞COMP.ALn␈↓ ↓H
␈↓ ↓H␈β	`␈↓␈↓ ↓Hwith␈α∂n=0,1,2,3.␈α∂Once␈α∂you␈α∂have␈α∞finished␈α∞generating␈α∞the␈α∞code␈α∞you␈α∞want,␈α∞exit␈α∞the␈α∞read␈α∞loop␈α∞by␈α∞this␈↓ ↓H
␈↓ ↓H␈β
λ␈↓␈↓ ↓Hunappetizing␈α
method:␈↓ ↓H
␈↓ αK␈β
0␈↓␈↓ αK␈↓ αK
␈↓ αK␈β
X␈↓*↑C␈↓ αK
␈↓ αK␈β␈↓.F␈↓ β≠␈↓ πZ;close the output files␈↓ αK
␈↓ αK␈β(␈↓.␈↓ β≠␈↓ πZ;do wait for this dot, to make sure all is well.␈↓ αK
␈↓ ↓H␈βP␈↓␈↓ ↓H␈↓ ↓H
␈↓ ↓H␈βx␈↓␈↓ ↓H
␈↓ ↓H␈β ␈↓␈↓αTo assemble the COMP.ALn files.␈↓␈↓ ↓H
␈↓ ↓H␈βH␈↓␈↓ ↓HYou␈α
have␈α
to␈α
run␈αPALX␈αacross␈αthe␈αfiles.␈αThere␈αis␈αa␈αfile␈αCOMP.PAL[HAL,HE]␈αwhich␈αis␈αjust␈αwhat␈↓ ↓H
␈↓ ↓H␈βp␈↓␈↓ ↓Hyou␈αwant.␈αGlance␈αat␈αit␈αfirst␈αto␈αmake␈αsure␈αthat␈αREALSW␈αis␈αset␈αto␈α1,␈αso␈αthe␈αright␈αfiles␈αget␈αassembled.␈↓ ↓H
␈↓ ↓H␈β
_␈↓␈↓ ↓HThen:␈↓ ↓H
␈↓ αK␈β
@␈↓␈↓ αK␈↓ αK
␈↓ αK␈β
h␈↓.AL HAL,HE␈↓ πZ;alias to HE␈↓ αK
␈↓ αK␈β∞⊂␈↓.R PALX␈↓ βk␈↓ πZ;invoke the assmebler␈↓ αK
␈↓ αK␈β∞8␈↓FOO←COMP␈↓ πZ;this will make a copy called FOO.BIN␈↓ αK
␈↓ αK␈β∞`␈↓<some palx output>␈↓ αK
␈↓ αK␈β∂λ␈↓*↑C␈↓ αK
␈↓ αK␈β∂0␈↓.␈↓ αK
␈↓ 6␈β↓␈↓α[20]
␈↓ ↓H␈β↓H␈↓␈↓ ↓H␈↓ ↓H
␈↓ ↓H␈β↓p␈↓␈↓αTo run the system␈↓␈↓ ↓H
␈↓ ↓H␈βα_␈↓␈↓ ↓HTo␈α
get␈α
the␈α
latest␈α
system,␈α
if␈α
it␈α
exists,␈α
you␈α
try␈α
the␈α
following:␈↓ ↓H
␈↓ αK␈βα@␈↓␈↓ αK␈↓ αK
␈↓ αK␈βαh␈↓.A ELF␈↓ βk␈↓ πZ;so no one will ruin your core image␈↓ αK
␈↓ αK␈ββ⊂␈↓.R 11TTY␈↓ πZ;the 11 loading program␈↓ αK
␈↓ αK␈ββ8␈↓␈↓ β#<some initial garbage.   Now watch out, 11tty uses character input>␈↓ αK
␈↓ αK␈ββ`␈↓*Get save file = HAL␈↓ πZ;Just type the G and watch the screen.␈↓ αK
␈↓ αK␈β∧λ␈↓␈↓ β≠␈↓ πZ;if the file is not found, do this instead:␈↓ αK
␈↓ αK␈β∧0␈↓*Load bin file = HAL␈↓ αK
␈↓ αK␈β∧X␈↓␈↓ β≠␈↓ πZ;if that is not found, see below␈↓ αK
␈↓ αK␈β¬␈↓*Overlay bin file = K1[11,SYS␈↓ αK
␈↓ αK␈β¬(␈↓*Overlay bin file = FOO␈↓ πZ;the one you just made␈↓ αK
␈↓ αK␈β¬P␈↓*Start at 130000␈↓ πZ;gets you to DDT on the VT05 console␈↓ αK
␈↓ αK␈β¬x␈↓␈↓ αK
␈↓ αK␈βε ␈↓␈↓ βh<now you have to move to the VT05. You are in DDT>␈↓ αK
␈↓ αK␈βεH␈↓*1000<alt><alt>G␈↓ πZ;you are off and running.␈↓ αK
␈↓ ↓H␈βεp␈↓␈↓ ↓H␈↓ ↓H
␈↓ ↓H␈βπ_␈↓␈↓αTo assemble the system␈↓␈↓ ↓H
␈↓ ↓H␈βπ@␈↓␈↓ ↓HIf␈α⊂HAL.BIN␈α⊂and␈α⊂HAL.SAV␈α⊂are␈α⊂not␈α⊂available␈α⊂or␈α⊂not␈α⊂desired,␈α⊂you␈α⊂can␈α⊂make␈α∂a␈α∂new␈α∂runtime␈α∂by␈↓ ↓H
␈↓ ↓H␈βπh␈↓␈↓ ↓Hassembling␈α
HAL.PAL[HAL,HE].␈αLook␈αon␈αpage␈αtwo␈αto␈αsee␈αwhich␈αswitches␈αare␈αturned␈αon.␈αYou␈αmost␈↓ ↓H
␈↓ ↓H␈βλ⊂␈↓␈↓ ↓Hlikely␈α
want␈α
to␈α
load␈α
INTERP,␈α
but␈α
not␈α
ALAID␈α
and␈α
not␈α
the␈α
arm␈α
stuff,␈α
unless␈α
you␈α
know␈α
it␈α
is␈α
working.␈↓ ↓H